9 Replies Latest reply on Nov 17, 2008 11:49 AM by Newsgroup_User

    Importing a template into DW

    Fl1p820
      I offered to help update a site. The site was made with two templates. I hadn't used templates before, so I read through the tutorials and have a good idea on how they work. I also looked for this problem in the help section and found nothing for this issue.
      I downloaded the site through the server by way of "Get File" on DW's site window. Upon trying to change links and text, I found that when I went to: Modify>Templates>Update pages.... I don't see that .dwt file in the Update Files window when choosing either "files that use..." option or the "Entire Site" option.
      This made sense to me because I did not create the template. So, the challenge was to import or migrate this template into the site assets of DW. I dunno if I'm using the right words, but I hope you understand my dilemma.
      I need DW to see the two templates and their child pages.
      I tried the search tool and can't find this particular problem on this forum.
      Thanks for the help.
      Cheers
        • 1. Re: Importing a template into DW
          Level 7
          The templates were not on the remote site (not that they need to be, but
          people sometimes put them there)?

          Anyhow, if you cannot find the templates, do this -

          1. Backup your site.
          2. Close all open files.
          3. Make a duplicate of one of the files
          3. Select this duplicate file in the file list.
          4. Do a find and replace in this CLOSED selected file for each of the
          following -

          Find -
          <!-- InstanceBegin template="/Templates/template.dwt"
          codeOutsideHTMLIsLocked="false" -->
          Replace -
          with nothing
          i.e., delete it.

          Find -
          <!-- InstanceEnd -->
          Replace -
          with nothing
          i.e., delete it

          Find -
          <!-- Instance
          Replace -
          <!-- Template

          You now have a template file. Rename it to '<whatever>.dwt' and move it to
          the Templates folder. Allow DW to manage the links when you do that.

          Now you can open it and edit out the contents in the editable regions before
          saving it again.

          Bada bing, bada boom.


          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "Fl1p820" <webforumsuser@macromedia.com> wrote in message
          news:gfibas$f4j$1@forums.macromedia.com...
          >I offered to help update a site. The site was made with two templates. I
          > hadn't used templates before, so I read through the tutorials and have a
          > good
          > idea on how they work. I also looked for this problem in the help section
          > and
          > found nothing for this issue.
          > I downloaded the site through the server by way of "Get File" on DW's
          > site
          > window. Upon trying to change links and text, I found that when I went
          > to:
          > Modify>Templates>Update pages.... I don't see that .dwt file in the Update
          > Files window when choosing either "files that use..." option or the
          > "Entire
          > Site" option.
          > This made sense to me because I did not create the template. So, the
          > challenge was to import or migrate this template into the site assets of
          > DW. I
          > dunno if I'm using the right words, but I hope you understand my dilemma.
          > I need DW to see the two templates and their child pages.
          > I tried the search tool and can't find this particular problem on this
          > forum.
          > Thanks for the help.
          > Cheers
          >

          • 2. Re: Importing a template into DW
            Fl1p820 Level 1
            Hi Murray,
            Thanks for replying so quickly.
            The Templates were at the remote site. That's where i got them from, sorry I wasn't clear.

            So, I backed up the site, duplicated the "main.dwt" file by right clicking on it in the finder window. Made a folder for it and put it in.
            Used find and replace and pasted your suggestion into the, search for: Source code, field.
            Set the "Find In" pull down to 'folder' and navigated to it.
            'Searched' and it didn't find it. I tried the other two instances and it didn't find it in the file.
            Obviously doing something wrong. Help!
            Thanks
            • 3. Re: Importing a template into DW
              Level 7
              If you already have the template files, then you can IGNORE my suggestions.
              So - what's the problem then?

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "Fl1p820" <webforumsuser@macromedia.com> wrote in message
              news:gfinls$1di$1@forums.macromedia.com...
              > Hi Murray,
              > Thanks for replying so quickly.
              > The Templates were at the remote site. That's where i got them from,
              > sorry I
              > wasn't clear.
              >
              > So, I backed up the site, duplicated the "main.dwt" file by right clicking
              > on
              > it in the finder window. Made a folder for it and put it in.
              > Used find and replace and pasted your suggestion into the, search for:
              > Source
              > code, field.
              > Set the "Find In" pull down to 'folder' and navigated to it.
              > 'Searched' and it didn't find it. I tried the other two instances and it
              > didn't find it in the file.
              > Obviously doing something wrong. Help!
              > Thanks
              >

              • 4. Re: Importing a template into DW
                Fl1p820 Level 1
                LOL, you're funny.
                Well the problem is that I can't update the child pages with the template.
                I need to migrate, move, import, or do whatever it is called, the main.dwt file into the sites assets so when I go to, Modify>Templates>Update Pages... this template (main.dwt) shows up in the field.
                Currently, nothing shows up in the "look in" pull down menu.
                How do I get DW to see the main.dwt file?

                And just to refresh your memory, I downloaded this template from the remote server.
                I did not create it. I believe that's why DW doesn't see the .dwt when I try to update it's child pages.

                Thanks again.
                • 5. Re: Importing a template into DW
                  Level 7
                  > How do I get DW to see the main.dwt file?

                  STEPS:

                  1. Verify that the template files are within a folder names "Templates"
                  that is at the root level of the local site.
                  2. Verify that the template files that are found in #1 have the same names
                  as the template markup that is in the head of each of your child pages.
                  3. If the first two tests are valid, then use SITE | Advanced > Recreate
                  Site Cache.

                  Now see if DW has found your Template files.

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "Fl1p820" <webforumsuser@macromedia.com> wrote in message
                  news:gfk8gd$54h$1@forums.macromedia.com...
                  > LOL, you're funny.
                  > Well the problem is that I can't update the child pages with the template.
                  > I need to migrate, move, import, or do whatever it is called, the main.dwt
                  > file into the sites assets so when I go to, Modify>Templates>Update
                  > Pages...
                  > this template (main.dwt) shows up in the field.
                  > Currently, nothing shows up in the "look in" pull down menu.
                  > How do I get DW to see the main.dwt file?
                  >
                  > And just to refresh your memory, I downloaded this template from the
                  > remote
                  > server.
                  > I did not create it. I believe that's why DW doesn't see the .dwt when I
                  > try
                  > to update it's child pages.
                  >
                  > Thanks again.
                  >

                  • 6. Re: Importing a template into DW
                    Fl1p820 Level 1
                    I was hopeful, but it didn't work.
                    If it comes down to it, I'd be happy to send you the .dwt and a child... wait, that sounds black marketish!
                    Anyhow, whatever you suggest. I did find the 'recreate site cache' method on one of your replies to another problem on the forum and it worked for him. I tried it and it didn't do the trick. I was hopeful!
                    Thanks

                    • 7. Re: Importing a template into DW
                      Level 7
                      Try this -

                      1. Open DW's Site Manager
                      2. Select the site name
                      3. Click on the "EXPORT" button to export this site's definition to a known
                      location on your hard drive. Make sure you select the top radio button on
                      the export dialog so that the FTP info is included in the export file.
                      4. With the site name still selected, click on the "REMOVE" button to
                      delete this site's definition (don't worry - your files will not be removed)
                      5. Now, click on the "IMPORT" button to import the site definition you just
                      removed.

                      Better?

                      If this fails, you can zip the complete site by selecting the root folder.
                      Send that zip file to me along with the site definition you just exported,
                      and I'll see what the problem is.

                      forums at great-web-sights dot com

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      ==================


                      "Fl1p820" <webforumsuser@macromedia.com> wrote in message
                      news:gfl43e$am8$1@forums.macromedia.com...
                      >I was hopeful, but it didn't work.
                      > If it comes down to it, I'd be happy to send you the .dwt and a child...
                      > wait, that sounds black marketish!
                      > Anyhow, whatever you suggest. I did find the 'recreate site cache' method
                      > on
                      > one of your replies to another problem on the forum and it worked for him.
                      > I
                      > tried it and it didn't do the trick. I was hopeful!
                      > Thanks
                      >
                      >
                      >

                      • 8. Importing a template into DW
                        newbiefliper
                        The answer Murray gave in an email was to re-create a site definition for the site.
                        I also renamed the root folder because it did have a "." in it.
                        After re-creating the site defintion, the templates became part of the site assets.
                        Now, I need to see if the template's child pages update. I'm so excited to see the templates in the site assets, I haven't tried to update them.
                        Thanks for the info Murray.
                        • 9. Re: Importing a template into DW
                          Level 7
                          Good luck!

                          --
                          Murray --- ICQ 71997575
                          Adobe Community Expert
                          (If you *MUST* email me, don't LAUGH when you do so!)
                          ==================
                          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                          ==================


                          "newbiefliper" <webforumsuser@macromedia.com> wrote in message
                          news:gfs9ko$4ac$1@forums.macromedia.com...
                          > Murray gave me the answer in an email.
                          > I needed to create a new site definition for the rootfolder.
                          > That worked!
                          > I left everything where it was. Renamed the root folder, edit sites>chose
                          > problem site, edit> pointed DW to same folder now renamed, and DW
                          > re-cached the
                          > site and the templates popped up.
                          >
                          > Thanks Murray!
                          >
                          >