3 Replies Latest reply on Dec 26, 2008 11:30 AM by Newsgroup_User

    Links not working

    ict@phs Level 1
      I am trying to collate some pupils work ready to be sent to the examiner. The exam board require each pupil's portfolio to be navigable using a browser. Each candidate has a standard folder structure to put their work in and based on this I have created a mini website for each pupil with all the index.html files (ie the one in each pupils root folder and the ones in all the subfolders) being created using a standard template file. There are a couple of editable regions to allow customisation of pupil name etc

      Within the folder for each pupil the links should be the same since the structure is identical.

      To create a common menu I have tried putting the following code into the template where Analysis, Specification etc are the subfolder names.

      <a href="Analysis/index.html" id="current">Problem Analysis</a></li>
      <li><a href="Specification/index.html">Specification</a></li>
      <li><a href="Implementation/index.html">Design and Implementation</a></li>
      <li><a href="Documentation/index.html">User Documentation</a></li>
      <li><a href="Social/index.html">Social, moral and Ethical effects</a></li>
      <li><a href="Bibliography/index.html">Bibliography</a></li>
      <li><a href="Appendix/index.html">Appendix</a></li>
      <li><a href="TPT/index.html">Timed Practical Task </a></li>

      However this produces the following code when the template is applied.

      <li id="active">
      <a href="../../Templates/Analysis/index.html" id="current">Problem Analysis</a></li>
      <li><a href="../../Templates/Specification/index.html">Specification</a></li>
      <li><a href="../../Templates/Implementation/index.html">Design and Implementation</a></li>
      <li><a href="../../Templates/Documentation/index.html">User Documentation</a></li>
      <li><a href="../../Templates/Social/index.html">Social, moral and Ethical effects</a></li>
      <li><a href="../../Templates/Bibliography/index.html">Bibliography</a></li>
      <li><a href="../../Templates/Appendix/index.html">Appendix</a></li>
      <li><a href="../../Templates/TPT/index.html">Timed Practical Task </a></li>

      Is there any way I can put code in the template to produce the first result rather than the second.

      What am I doing wrong?

        • 1. Re: L
          Level 7
          to clarify- you have a site or project with a series of folders.
          Each folder will contain pages with the same filenames.

          You want links in the template that when clicked, go to a page inside the
          current folder, like joe/info.html if already looking at a page in joe
          folder, or sally/info.html if looking at a page in the sally folder.

          one way-
          Select one of the links.
          dw menu->Modify->Templates->Make Attribute editable
          in the dialog box, select the href attribute, and set type as text then
          enter the default value you want it to have in each page.

          repeat for each of these links.

          Now update the pages.

          Note- I am a bit worried by this path you posted:
          <a href="../../Templates/Analysis/index.html

          Dw should have made this path
          <a href="../Templates/Analysis/index.html

          meaning go Up one folder level

          Is the local site folder defined to the folder containing the "homepage" ?
          Is the Templates folder in the root level of the local site folder?

          Adobe Community Expert, dreamweaver


          • 2. Re: L
            ict@phs Level 1
            First of all thank you for clarifying what I was trying to say. You managed to say in a few lines what took me several paragraphs!

            Secondly I didn’t know it was possible to do what you described. Very useful! It took me a while to work out how it was doing it but I think I have now got the hang of it. When set up as you describe, applying the template writes the link based on the default value set when making an attribute editable. The link itself can’t be changed but there is some editable code added to the page which defines the default value. Editing this and reapplying the template creates a slightly modified link.

            In answer to your other points the local site folder is the all encompassing folder with the pupils folders, the template folder, a style sheet and the root index.html.

            Thank you
            • 3. Re: L
              Level 7
              The normal use of having an Editable attribute is so that just that
              attribute can be changed in the child pages.

              You would edit it in the child pages by going to modify->template properties

              This use of it is to get the child pages to have a link that is not
              "managed" by the template engine. It should work okay- as long as things
              don't get overly complex- such as starting to use subfolders inside of each
              student folder. If there is just a single level of pages inside each student
              folder, and each student folder contains all of those default pages, it
              should work.

              Adobe Community Expert, dreamweaver