3 Replies Latest reply on Dec 26, 2006 3:45 PM by Newsgroup_User

    Templates and External CSS Not Working

    mcshaw
      In the header of the template I have:

      <script src="changingStyles.js" type="text/javascript"></script>
      <link href="screenStyle.css" rel="stylesheet" type="text/css">


      This all works great in Dreamweaver, but in contribute not so. It seems that contribute does not re-write the path. What do I do!
        • 1. Re: Templates and External CSS Not Working
          Level 7
          You should not have that link in the head of a template page[1].

          All links in template pages should be one of the following -

          1. relative to the template itself, e.g.,

          <script src="../whatever/whatever.js"

          2. relative to teh root of the site, e.g.,

          <script src="/whatever/whatever.js"

          3. absolute, e.g.,

          <script src=" http://www.example.com/whatever/whatever.js''

          Assuming you have #1, the link would then imply that the js file is in the
          Templates folder, which is not a best practice.

          Open the site in DW, and either remake that link in the template, or if the
          js file *is* in the Templates folder, use DW's File panel to move it out of
          that folder into some other location in the site.

          That should fix things for you.

          --------------
          [1] There is a unique situation where such a link would be proper for
          templates, but I'm guessing that this is not the case here.

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.dreamweavermx-templates.com - Template Triage!
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
          ==================


          "mcshaw" <webforumsuser@macromedia.com> wrote in message
          news:eln9dt$q2h$1@forums.macromedia.com...
          > In the header of the template I have:
          >
          > <script src="changingStyles.js" type="text/javascript"></script>
          > <link href="screenStyle.css" rel="stylesheet" type="text/css">
          >
          >
          > This all works great in Dreamweaver, but in contribute not so. It seems
          > that
          > contribute does not re-write the path. What do I do!
          >


          • 2. Re: Templates and External CSS Not Working
            ROGM
            It may be a red herring about Contribute because if its a dwt file with the path as you describe the when you update the derived pages you may find that the path becomes /templates/yourFile. So it will not work even if you F12 with the html file open and of course not in Contribute either. Look in the derived file and see what path is given after update (after saving the dwt changes). Did yours work in the derived file when tested in the browser in Dreamweaver? Interested to know.
            • 3. Re: Templates and External CSS Not Working
              Level 7
              It's a user error, not a red herring....

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "ROGM" <barley.twist2@btinternet.com> wrote in message
              news:emsan2$ivh$1@forums.macromedia.com...
              > It may be a red herring about Contribute because if its a dwt file with
              > the
              > path as you describe the when you update the derived pages you may find
              > that
              > the path becomes /templates/yourFile. So it will not work even if you F12
              > with
              > the html file open and of course not in Contribute either. Look in the
              > derived
              > file and see what path is given after update (after saving the dwt
              > changes).
              > Did yours work in the derived file when tested in the browser in
              > Dreamweaver?
              > Interested to know.
              >