Announcement

Collapse
No announcement yet.

Changing the style of a link based on the current page

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

    Changing the style of a link based on the current page

    Afternoon all.

    I've been searching the forums, knowledgebase and advanced users guide for a while now but I can't seem to find a way to do this.

    Basically, what I want to do is change the look of a navigation link (both brochure page and section pages) if you happen to be viewing the page to which it relates. For example, when I'm looking at the 'about us' page, I'd like the link to 'about us' on that page to have a different style from the rest of the navigation.

    I know I would have to use a condition for this but I'm struglling to find a form for it without doing something more 'manual' like: if pagename = 'about us' then change the class to 'differentstyle'. Although I guess that method would work it doesn't help so much when you can't be sure of the page names (which I wouldn't be in a client's self-managed shop). Is it possible to have something that says: if this link url is the same as the url of this page display the link like this and not like that?

    I had half-thought that I'd seen this very idea somewhere before but I can't find the answer however much I search, so would be very very grateful if anyone can help.

    Much thanks.

    Angi
    OXLink Web Design (Oxford)
    Actinic developers since version 3
    01865 361696

    #2
    Page 47 of the Advanced User Guide 1.3 shows "Highlighting the current section in the section list" .. is that what you are after? If not it will show the concept and you can adapt to suit your specific needs.


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Must have a different AUG... but no matter

      Hi John,

      Thanks very much for that. I had a different copy of the AUG (the US one I think) and it wasn't so obvious but I've downloaded the UK 1.3 and there it is, plain as day! Variable qualifiers will now be my new friend...

      You're an absolute gem!

      Angi
      OXLink Web Design (Oxford)
      Actinic developers since version 3
      01865 361696

      Comment

      Working...
      X