The typical way is to use <r:navigation>. This snippet should do what you like:

<ul class="floatRight">
<r:navigation urls="Home: /| Shop: /shop/ | Projects: /projects/ | Gallery: /gallery/ | About Me: /aboutme/ | Contact Us: /contactus/"> <r:normal><li><a href="<r:url />" title="<r:title />"><r:title /></a></li></r:normal> <r:here><li><a href="<r:url />" title="<r:title />" class="here"><r:title /></a></li></r:here>
</r:navigation>
</ul>

Unfortunately, it won't let you add the "last" class, but you could add that with JavaScript pretty easily. If you're using Prototype:

document.observe("dom:loaded", function(){ $$('li:last-child').invoke('addClassName', 'last'); });

Your other option is to use a bunch of <r:if_url> tags, one on each link, to see whether you should add the "here" class.

Cheers,

Sean


Bartee Lamar wrote:
I have this as my menu.

I need to identify which is the current page so I can set the
class="here"

How can I do that ?

<ul class="floatRight">
      <li><a href="/" title="Home" class="here"> Home</a></li>
      <li><a href="/shop/" title="Shop" >Shop</a></li>
      <li><a href="/projects/" title="Projects">Projects</a></li>
      <li><a href="/gallery/" title="Gallery">Gallery</a></li>
      <li><a href="/aboutme/" title="About Me" >About Me</a></li>
      <li><a href="/contactus/" title="Contact Us" class="last">Contact
Us</a></li>
    </ul>

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to