[Radiant] How to make <r:navigation.. keep "here" class on li

Loren Johnson loren at fn-group.com
Mon Oct 9 09:41:19 CDT 2006


Yes I'm currently employing the selected tag under navigation, here  
is my current navigation code:

<ul>
<r:navigation urls="Home: /; Office: /diocesan-office; Ministries: / 
ministries; Spirituality: /spirituality; News: /news; Calendar: / 
calendar; Directory: /directory; Church Finder: /church-finder">
   <r:normal><li><a href="<r:url />"><r:title /></a></li></r:normal>
   <r:here><li class="here"><r:title /></li></r:here>
   <r:selected><li><a href="<r:url />"><r:title /></a></li></r:selected>
</r:navigation>
</ul>

This works fine if I a page is simply a child of a listed url,  
however if a page is a grandchild, great-grandchild, etc. then the  
parent/grandparent link is no longer in a selected state (I should  
have made that clearer).

See this link for a screenshot which shows the News "tab" currently   
selected:

http://www.fn-group.com/clients/diopa/diopa_news.jpg

On this page tag/page you'll see a series of links under the heading  
"Bishop's Column" (November Article, December Article, etc.) If you  
were to click on December Article for instance the breadcrumb would  
read "Home > News > Bishop's Column > December Article" and the News  
"tab" should still be currently selected (though right now it  
wouldn't be).

I think I've looked at the code for the navigation tag closely enough  
to now know that this isn't an option as-is.

Are any additional options within the navigation control currently on  
the table? I would think that building-in some sort of option such as  
"selected_if_grandchild" could have universal application. If not,  
what would be my next best option?

Has anyone else dealt with this sort of nav scheme in Radiant yet?

Thanks,

Loren



On Oct 8, 2006, at 6:04 PM, Bryan wrote:

> Loren Johnson wrote:
>> Does anyone have an idea on how to create a navigation menu using
>> standard Radiant/Radius tags in which the parent item keeps a "here"
>> class as long as any child, grandchild, great-grandchild, etc. is the
>> current page?
>>
>
> Have you tried using "selected" within the navigation tag?
>
> http://radiantcms.org/blog/2006/06/15/tag-primer-2/
>
> Thanks,
>
> Bryan
>
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Loren Johnson
loren at fn-group.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.radiantcms.org/pipermail/radiant/attachments/20061009/934ad0ff/attachment.html


More information about the Radiant mailing list