We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36549
    • 572 Posts
    Hi,

    I want to add a link to a different folders documents but can’;t figure it out.

    I have 5 tabs on the home page that when rolled over display some content above...but when the tab is clicked i want the link to be documents contained in a different folder. The chunk for the tabs is like this:
    <li><a class="[+classes+]" id="link[+id+]" href="Services/[~[+id+]~]" title="[+title+]"><em>[+pagetitle+]</em><span><strong>[+longtitle+]</strong>
    [+content+]</span></a></li>


    I have added ’Services/’ before the [~[+id+]~] as this is the folder where the documents i want to link to are. But the [~[+id+]~] just references the tabbed pages id. I actually want it to reference Services/servicespage1.php.

    My Ditto call is as follows:

    [!Ditto? &documents=`24,25,26,27,28` &tpl=`tabsmenu` &total=`5` &display=`5` &sortBy=`id` &sortDir=`ASC`!]

    Is this possible?

    Thanks

    J
      www.9thwave.co.uk
         WEB | DESIGN | PRINT
      • 36549
      • 572 Posts
      For anyone that wants to know how this is done....i just used the [+alias+] and added the title of the page which i want to link to in the Documents alias area.
      so the a href looks like this:
      <a  class="[+classes+]" id="link[+id+]" href="Services/[+alias+]" title="[+title+]">
      ...where Services is the folder in the document tree and the alias is the title of the page i’m linking to.

      Quite straight forward really wink

      It would be great if i didn’t have to hardcode the reference to the Services/... folder and i could add a forward slash in the alias field instead but it only seems to accept alphanumeric characters...if this could be changed somewhere though it would add fantastic flexibility.
        www.9thwave.co.uk
           WEB | DESIGN | PRINT
        • 7455
        • 2,204 Posts
        did you set friendly alias path? if so than [~[+id+]~] should do the trick creating the whole path
          follow me on twitter: @dimmy01
          • 36549
          • 572 Posts
          Hi Dimmy,

          Yes i have friendly alias path.
          The menu i’m using works a bit differently though as the rollover state displays content in an absolute positioned container above the tabbed items and this content is generated by having it’s own page...so i couldn’t just have the [~[+id+]~] as it would just dsplay exactly what the rollover is doing.
          I had to reference a totally different folder and page in the document tree and id in this instance would not work.

          Cheers
            www.9thwave.co.uk
               WEB | DESIGN | PRINT