17 Replies Latest reply on Jul 18, 2007 8:31 AM by Jencs

    Creating new document from Template LINK PROBLEM

    Jencs Level 1
      When I create a new document from a template I just created Dreamweaver turns all my links into local links. For example a link that was originally ../../../style.css becomes file:///C|/Program%20Files/Apache%20Group/Apache2/style.css. I have already read the tech note about updating to 8.02 and going to site management and choosing Don't re-write document relative paths. I tried unchecking the box and checking it and the links still get converted to local links. I have gone to Edit/Preferences and tried changing the Update Links When Moving Files choice to never and it still changes the links to local... Basically I have tried everything and I posted this same issue on DevShed and no one could assist me. Can someone out there help me so that I can use my templates?!? I would very much appreciate it because right about now I am ready to pack it in and go live in Alaska.
      Thank you!
      Jennifer
        • 1. Re: Creating new document from Template LINK PROBLEM
          Level 7
          Have you defined a site? ie Site > Manage Sites > New etc

          --
          Jo


          "Jencs" <webforumsuser@macromedia.com> wrote in message
          news:f72qub$js3$1@forums.macromedia.com...
          > When I create a new document from a template I just created Dreamweaver
          > turns
          > all my links into local links. For example a link that was originally
          > ../../../style.css becomes
          > file:///C|/Program%20Files/Apache%20Group/Apache2/style.css. I have
          > already
          > read the tech note about updating to 8.02 and going to site management and
          > choosing Don't re-write document relative paths. I tried unchecking the
          > box
          > and checking it and the links still get converted to local links. I have
          > gone
          > to Edit/Preferences and tried changing the Update Links When Moving Files
          > choice to never and it still changes the links to local... Basically I
          > have
          > tried everything and I posted this same issue on DevShed and no one could
          > assist me. Can someone out there help me so that I can use my
          > templates?!? I
          > would very much appreciate it because right about now I am ready to pack
          > it in
          > and go live in Alaska.
          > Thank you!
          > Jennifer
          >


          • 2. Re: Creating new document from Template LINK PROBLEM
            Jencs Level 1
            Yes, I have. As I stated in my thread below, "I have already read the tech note about updating to 8.02 and going to site management and choosing Don't re-write document relative paths. I tried unchecking the box and checking it and the links still get converted to local links."
            Jen
            • 3. Re: Creating new document from Template LINK PROBLEM
              Level 7
              Sorry, I probably phrased the question badly - Have you defined the site?

              --
              Jo


              "Jencs" <webforumsuser@macromedia.com> wrote in message
              news:f72v32$oqj$1@forums.macromedia.com...
              > Yes, I have. As I stated in my thread below, "I have already read the
              > tech
              > note about updating to 8.02 and going to site management and choosing
              > Don't
              > re-write document relative paths. I tried unchecking the box and checking
              > it
              > and the links still get converted to local links."
              > Jen
              >


              • 4. Re: Creating new document from Template LINK PROBLEM
                Level 7


                > For example a link that was originally ../../../style.css

                Is the link above actually IN a template file?

                If the templates are in the Templates folder at the root level of a defined
                site, it is Not Possible to go three folder levels up from there.

                dw is putting an absolute file path starting with c:/ because you've linked
                to something that is not within the local site folder.

                suggestion?
                In the template, use the "browse to file" dialog box to pick the files you
                place or link to. If the files are in the Local site folder, dw will get
                the paths correct.

                --
                Alan
                Adobe Community Expert, dreamweaver

                http://www.adobe.com/communities/experts/



                • 5. Re: Creating new document from Template LINK PROBLEM
                  bregent Most Valuable Participant
                  Assuming you defined the site correctly, are your CSS files located within your defined site?
                  • 6. Creating new document from Template LINK PROBLEM
                    Jencs Level 1
                    Jo, if I understand what you are asking, yes, I have defined the site. I hope what you mean is that I went to the Site menu, choose New Site and went through the process. I used the Advanced tab to do all the definitions because I am working with a remote server. So If I understand, yes I have defined the site.

                    Alan, I am not sure I understand but the way my local root folder is set up is like this: It is in the Apache htdocs folder. The site is in a folder called pulse, inside that folder I have 4 other folders that contain either images for the web pages or web pages. Some of the folders contain other folders. When I created the page that the template was made from, the links were defined as if they were inside the pulse folder, inside another folder in the pulse folder named teachers, then there is another folder inside teachers names lesson 1. The templates links were created as if they were in lesson 1. When I created the template Dreamweaver created a folder named Templates automatically but all the other folders and files stayed the same. I didn't move anything anywhere.
                    So I guess my question is, when I create the page that the template will be designed from are you saying that I should create the page as if it was in the local root folder, pulse, and all the links would go from there? Meaning if my style sheet was in the root folder also the link would be just href src=style.css and not src="../../../style.css" and if I was linking to an image in the images folder the link would be href src="images/img.gif instead of ../../../images/img.gif? Then, when I have to move the new page I just created from the template into the lesson 1 folder in the teacher's folder Dreamweaver will update the links accordingly? I hope you understand what I am trying to say....
                    Thank you all for trying to help..I hope this explanation will assist in solving this problem!
                    Jen
                    • 7. Re: Creating new document from Template LINK PROBLEM
                      Level 7
                      On Wed, 11 Jul 2007 14:54:03 +0000 (UTC), "Jencs"
                      <webforumsuser@macromedia.com> wrote:

                      >For example a link that was originally
                      >../../../style.css becomes
                      >file:///C|/Program%20Files/Apache%20Group/Apache2/style.css.


                      A correct link in a properly made template cannot be
                      "../../../style.css". The template must reside in the Templates
                      directory which must be located at the site's root. Your link goes up
                      three directory levels, which would put it outside the site's root.

                      One other thing is that links will all be local until you save the
                      document because Dreamweaver has no way of knowing where you're going to
                      save the file.

                      Or am I misunderstanding?

                      Gary
                      • 8. Re: Creating new document from Template LINK PROBLEM
                        Level 7

                        > I
                        > created the page that the template was made from, the links were defined as if
                        > they were inside the pulse folder, inside another folder in the pulse folder
                        > named teachers, then there is another folder inside teachers names lesson 1.
                        > The templates links were created as if they were in lesson 1. When I created

                        my eyes glazed over.

                        Please do this:
                        open a new html document.
                        Don't Save It.
                        insert a link to the template file in question.
                        insert a link to the .css file in question.

                        view source, copy the code, and paste in reply.


                        When working on a template- you make the links and paths work IN the
                        template. Not as if it was at some other folder level. If the paths are
                        correct in the template, dw will manage the paths in the child files.

                        " Then, when I have to move the created new
                        page from the template into the lesson 1 folder in the teacher's folder
                        Dreamweaver will update the links accordingly?"

                        How are you creating these child pages of the template???

                        correct way-
                        dw menu-->File-->New-->click templates tab
                        pick this site, pick this template.
                        Save this file to within the Local Site Folder with the filename you want.
                        Now you can work on it. AND- all the paths should be correct.

                        wrong way- anything involving "Save As" or manually moving files in the
                        Files Panel or directly on the hd.





                        --
                        Alan
                        Adobe Community Expert, dreamweaver

                        http://www.adobe.com/communities/experts/



                        • 9. Re: Creating new document from Template LINK PROBLEM
                          Jencs Level 1
                          Ahhh I think I am starting to understand thanks to Gary and Alan. So the fact that I am writing ../../ etc means that dreamweaver is translating that as if I am saying go OUTSIDE the root folder two folders away and find, outside the root folder, and outside one other folder a folder named images... So, when I create a template from an existing document, in the existing document all the links should be written as if I am a page sitting the the root folder. So, when I write links to images they would just be images/img.gif and w hen I link to the style sheet it would just be style.css and when I link to a file inside the teachers folder then inside another folder within the teachers folder I would write teachers/lesson1/page.htm. Then, when I save the new document I just created to where it will actually live in the root folder, dreamweaver (depending on my settings) will change the links accordingly.
                          Is this correct?? I hope so because I have spent WAY too much time trying to figure this out eheheh.
                          Thank you very much!
                          Jennifer
                          • 10. Re: Creating new document from Template LINK PROBLEM
                            Level 7
                            i can't read words to describe this.

                            if you still don't understand, please show the actual paths in the source.

                            Please do this:
                            open a new html document.
                            Don't Save It.
                            insert a link to the template file in question.

                            ##USE THE "browse to file" dialog box on the Properties Panel to make the
                            link. Don't type what you think the link is ##

                            insert a link to the .css file in question the same way.

                            view source, copy the code, and paste in reply.

                            NOW- save this document to the root level of the site.
                            copy the source for these two links and paste in reply.

                            again- don't hand type the links when working on a template. Use the "browse
                            to file" dialog box so the path is correct IN the template for where the
                            template is saved.

                            then- create a child page the correct way, by using
                            File->New->Templates->this site from list->this template from list
                            then Save that file to within the site.

                            If a path is made correctly in the template, and the child page is created
                            correctly, dw will manage the paths for you.
                            If the child page is made correctly- any changes to "locked" areas of the
                            template will be carried over to the local copies of the child pages,
                            leaving the unique content in the Editable Areas alone.



                            --
                            Alan
                            Adobe Community Expert, dreamweaver

                            http://www.adobe.com/communities/experts/



                            • 11. Re: Creating new document from Template LINK PROBLEM
                              Jencs Level 1
                              OK, here you go:
                              First code request from unsaved new document source:

                              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                              <html xmlns=" http://www.w3.org/1999/xhtml">
                              <head>
                              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                              <title>Untitled Document</title>
                              </head>
                              <body>
                              <a href="file:///C|/Program Files/Apache Group/Apache2/htdocs/pulse_Curriculum/style.css">This is a link to the style sheet.</a>
                              <a href="file:///C|/Program Files/Apache Group/Apache2/htdocs/pulse_Curriculum/teachers/Study-Theory--Musicianship/lesson1/theoryL esson1.htm">This is a link to a page in my web site.</a>
                              <a href="file:///C|/Program Files/Apache Group/Apache2/htdocs/pulse_Curriculum/Templates/content.dwt">This is a link to the template.</a>
                              </body>
                              </html>





                              Here is the same file after being saved to the root folder of my website:

                              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                              <html xmlns=" http://www.w3.org/1999/xhtml">
                              <head>
                              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                              <title>Untitled Document</title>
                              </head>
                              <body>
                              <a href="style.css">This is a link to the style sheet.</a>
                              <a href="teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">This is a link to a page in my web site.</a>
                              <a href="Templates/content.dwt">This is a link to the template.</a>
                              </body>
                              </html>





                              OK so I saved the above file as a template. Then I followed the rest of your directions exactly as you typed them and created a new document from this template and this is what I got for the source code... Just doing this assisted in understanding what is going on much more, so I am sure I can continue to play with it and figure out why, now, everything says ../../../Template before it but if you can tell what I am doing wrong quickly I would appreciate any other wisdom you would like to share...Thank you for all of your help so far!
                              Jen

                              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                              <html xmlns=" http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/LinkTest.dwt" codeOutsideHTMLIsLocked="false" -->
                              <head>
                              <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                              <!-- InstanceBeginEditable name="doctitle" -->
                              <title>Untitled Document</title>
                              <!-- InstanceEndEditable -->
                              <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
                              </head>
                              <body>
                              <!-- InstanceBeginEditable name="Links" -->
                              <a href="../../../Templates/style.css">This is a link to the style sheet.</a>
                              <a href="../../../Templates/teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">T his is a link to a page in my web site.</a>
                              <a href="../../../Templates/Templates/content.dwt">This is a link to the template.</a>
                              <!-- InstanceEndEditable -->
                              </body>
                              <!-- InstanceEnd --></html>


                              • 12. Re: Creating new document from Template LINK PROBLEM
                                Level 7
                                file:///C|/Program Files/Apache
                                Group/Apache2/htdocs/pulse_Curriculum/style.css

                                is pulse_Curriculum the local site folder for this site?

                                is this all one site?
                                Just want to be clear on this this that with all the folders you described
                                earlier- there aren't two or three nested sites and several sets of
                                Templates folders at different folder levels.



                                <a href="style.css">This is a link to the style sheet.</a>
                                <a href="teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">This
                                s a link to a page in my web site.</a>
                                <a href="Templates/content.dwt">This is a link to the template.</a>

                                the above worked correctly, and the file was saved to the root level of this
                                site.


                                <a href="../../../Templates/style.css">This is a link to the style
                                sheet.</a>

                                where in the site was this child page saved to?
                                please put in this format:
                                file:///C|/Program Files/Apache Group/Apache2/htdocs/pulse_Curriculum/??

                                to clarify if i didn't mention it earlier-
                                Only .dwt template files should be in the Templates folder.
                                No other .html files, no css files, no subfolders, nothing but .dwt files.

                                --
                                Alan
                                Adobe Community Expert, dreamweaver

                                http://www.adobe.com/communities/experts/



                                • 13. Re: Creating new document from Template LINK PROBLEM
                                  Level 7


                                  > OK so I saved the above file as a template.

                                  and to be certain- can you please say exactly how you saved it as a
                                  template? What menu choice?

                                  correct: open the regular web page.
                                  dw menu-->File-->Save As Template
                                  Let dw put it into the Templates folder at the root level.

                                  please open /Templates/LinkTest.dwt
                                  Are the links correct in it?
                                  does it pass a file-->check page-->Check Links

                                  they should be:
                                  <a href="../style.css">This is a link to the style sheet.</a>
                                  <a
                                  href="../teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">This
                                  is a link to a page in my web site.</a>

                                  if the links aren't like that in the template itself, what are they?

                                  --
                                  Alan
                                  Adobe Community Expert, dreamweaver

                                  http://www.adobe.com/communities/experts/



                                  • 14. Re: Creating new document from Template LINK PROBLEM
                                    Jencs Level 1
                                    Before I answer your questions from the last 2 posts you wrote which I could not answer before the weekend I would like to say that I am getting extremely frustrated with this whole issue. I understand that you are trying to help and I am not sure if you are an Adobe staff person or not but all I want to do is set up a web site using templates. I have followed ALL of your directions and the Template folder keeps showing up in my links! Is there another way for me to get assistance with this issue from Adobe? As I said I am really getting frustrated here... Thank you.

                                    Now to answer your questions:

                                    is pulse_Curriculum the local site folder for this site?
                                    >Yes

                                    is this all one site?
                                    >Yes

                                    where in the site was this child page saved to? It was saved to this location:
                                    >file:///C|/Program Files/Apache Group/Apache2/htdocs/pulse_Curriculum/

                                    to clarify if i didn't mention it earlier- Only .dwt template files should be in the Templates folder. No other .html files, no css files, no subfolders, nothing but .dwt files.
                                    >I understand NO OTHER files can be in the templates folder and dreamweaver should create that folder when you save as template, I did not put any other files in the folder nor did I create it myself.

                                    and to be certain- can you please say exactly how you saved it as a template? What menu choice?
                                    >I opened the regular web page, went to File then Save As Template.

                                    Let dw put it into the Templates folder at the root level.
                                    >Yes.

                                    please open /Templates/LinkTest.dwt Are the links correct in it?
                                    >NO

                                    does it pass a file-->check page-->Check Links
                                    I do not understand what you mean.

                                    they should be:
                                    <a href="../style.css">This is a link to the style sheet.</a>
                                    <a href="../teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">This is a link to a page in my web site.</a>

                                    if the links aren't like that in the template itself, what are they?
                                    >They are not correct, the links in the template are now as follows:
                                    <body>
                                    <!-- TemplateBeginEditable name="Links" -->
                                    <a href="style.css">This is a link to the style sheet.</a>
                                    <a href="teachers/Study-Theory--Musicianship/lesson1/theoryLesson1.htm">This is a link to a page in my web site.</a>
                                    <a href="Templates/content.dwt">This is a link to the template.</a>
                                    <!-- TemplateEndEditable -->
                                    </body>
                                    </html>

                                    Can you please help me figure this out, I am under the gun here and nothing is working!
                                    Thank you again,
                                    Jennifer
                                    • 15. Re: Creating new document from Template LINK PROBLEM
                                      Level 7

                                      >> They are not correct, the links in the template are now as follows:
                                      > <body>
                                      > <!-- TemplateBeginEditable name="Links" -->
                                      > <a href="style.css">This is a link to the style sheet.</a>


                                      then open the template.
                                      Correct the links so they work IN the template.

                                      with the template open-
                                      dw menu-->File-->Check Page-->Check Links


                                      fix every broken link in the results panel by using the "browse to file"
                                      button and making a document relative path to the linked file.

                                      they should all change so that the paths start with a leading

                                      ../ which means go up one folder level


                                      Once the paths are correct IN the template, dw will manage the paths
                                      correctly in the child pages.

                                      Once the paths are correct IN the template, you will no longer see
                                      ../Templates in paths in the child files.


                                      This is a user to user forum. I am not an employee of adobe. I am a
                                      volunteer.

                                      Other options for help can be found in the support section of adobe.com
                                      You have 2 help calls by phone, as far as i know.



                                      --
                                      Alan
                                      Adobe Community Expert, dreamweaver

                                      http://www.adobe.com/communities/experts/



                                      • 16. Re: Creating new document from Template LINK PROBLEM
                                        Jencs Level 1
                                        OK, I will give that a try tomorrow I really appreciate you help since you are not am employee of Adobe... Hopefully this will work and you will never hear from me again hehehe.
                                        As soon as I get in tomorrow I will follow your directions and will let you know how things go. Again, thanks for all your help!
                                        Jennifer
                                        • 17. Re: Creating new document from Template LINK PROBLEM
                                          Jencs Level 1
                                          OK! That worked! Now the new files from the template update correctly!
                                          Thank you again!
                                          Jennifer