Announcement

Collapse
No announcement yet.

Previous and Next Section Links

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Previous and Next Section Links

    Hi all,
    I have also used the code for NEXT_SECTION_URL and PREV_SECTION_URL in my primary template. However, I would love to be able to rename the actual section name to the words: "Next" and "Previous" as it is confusing to the eye. Is there any way to do this? The cose as you know it is:

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><a href="NETQUOTEVAR:PREV_SECTION_URL">
    NETQUOTEVAR:PREV_SECTION_NAME</a>
    </td>
    <td align="right">
    <a href="NETQUOTEVAR:NEXT_SECTION_URL">
    NETQUOTEVAR:NEXT_SECTION_NAME
    </a>
    </td>
    </tr>
    </table>

    Thanks.

    #2
    I haven't used the next/previous before but I imagine replacing NETQUOTEVAR:PREV_SECTION_NAME and NETQUOTEVAR:NEXT_SECTION_NAME with the actual words you want will work.
    www.gbradley.co.uk
    Web Development, Actinic Patches, Scripts & more

    Comment


      #3
      I tried that. However, I experienced problems on the first page where you get a link for Next and Previous that take you nowhere! You are however safe on the next pages.

      Comment


        #4
        I just tried that and I see what you mean. I don't know how to sort this within Actinic, but i have a (hastily made) javascript workaround.

        First, add an ID and style to the previous and next links:

        Code:
        <a href="NETQUOTEVAR:PREV_SECTION_URL" id="previous" style="display:none">
        NETQUOTEVAR:PREV_SECTION_NAME</a>
        
        <a href="NETQUOTEVAR:NEXT_SECTION_URL" id="next" style="display:none">
        NETQUOTEVAR:NEXT_SECTION_NAME</a>
        This will hide the links from the user. The javascript is going to test each link and keep hidden the ones which don't have an "href" property - the ones which don't lead anywhere. The ID attributes are needed so the script doesnt have to test every link on the page. Place this directly above the </BODY> tag at the bottom of the primary template:

        Code:
        <script>
        links=new Array(document.getElementById("previous"),document.getElementById("next"));
        for (i=0;i<links.length;i++){
        	if ((links[i].href).match(/html$/)!=null){
        		links[i].style.display="inline";
        		if (links[i].href==location.href){
        			links[i].style.display="none";
        			}
        		}
        	}
        </script>
        This loops through the links and makes visible the proper links, leaving hidden those blank ones (it looks a little complex because IE and Firefox treat href properties differently). I tried it out on my test site and it worked fine. A final point to note is that the above assumes your pages all use the '.html' extension.
        www.gbradley.co.uk
        Web Development, Actinic Patches, Scripts & more

        Comment


          #5
          Excellent!! I had given up on the subject. I will certainly give this a try and hope that it works for me too. Thanks very much for your input.

          Comment


            #6
            Are we forgetting something ?

            Hi Folks,

            Love the thread becasue i too would like this sort of SKIP back and for function on my site, and reading your details, i got it.

            Fara, you siad :
            I would love to be able to rename the actual section name to the words: "Next" and "Previous"
            Just use :
            HTML Code:
            <td><a href="NETQUOTEVAR:PREV_SECTION_URL">Previous</a> | <a href="NETQUOTEVAR:NEXT_SECTION_URL">Next</a></td>
            You may decide to control font size and colour using a CSS <class> tag. Up to you.

            Also, you said
            I experienced problems on the first page where you get a link for Next and Previous that take you nowhere! You are however safe on the next pages.
            I see what you mean.

            As well as Kermy's solution, (which I might try, (thanks Kermy)). Actinic gets around this is by having more than one Primary Template, i.e Primary(no Previous), Primary(no Next), and simply modify the template with the differences, and select the relevant template in Actinic, Layout > Overall Layout, changin 'Use Parent' to 'Primary(NoPrevious)', etc etc.

            This Multiple Primary Template mentality is how you can style your pages generally, so that different Sections look different, apart from the main Actinic input subsections and fragments.

            Are you with me ?

            Its seems laborious and difficult to keep track of 'All-Section' changes, but i have found it very useful in keeping a core structure to my Sections, Sub-Sectins and Sub-Sub Sections whilst allowing me to make each Secion level completely different with Section Level Relevant content.

            Hope this help, Simon.
            esafetysigns.co.uk
            your instant download portal for self printable health and safety signs and posters
            ... download once use as many times as you like !


            http://www.esafetysigns.co.uk/index.html
            http://www.esafetysigns.co.uk/acatalog/index.html

            Comment

            Working...
            X