Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » navigation styling

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1063 Views
  • RR_EHV
    Avatar
    Community Member
    2 Posts

    navigation styling Link to this post

    Hi all,

    I'm having some trouble styling a specific element in the navigation.

    This is generated:

    <li><a href="/subscribe/" title="Go to the Subscribe page" class="link">Subscribe to newsletter</a></li>

    How am i able to add more to the class, so i can style it with the CSS files?

    Thanks for any help!

  • ajshort
    Avatar
    Community Member
    244 Posts

    Re: navigation styling Link to this post

    RR_EHV,

    you could use something like the following: it adds an extra class if the current link has the URL of "subscribe".

    <li><a href="$Link" title="Go to the $Title.XML page" class="link <% if URLSegment = subscribe %>subscribe-link<% end_if %>">$MenuTitle</a></li>

  • RR_EHV
    Avatar
    Community Member
    2 Posts

    Re: navigation styling Link to this post

    Works like a charm.
    Much obliged...

    1063 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.