Dan Shields wrote:
For other noobs like me that are looking at how to create a navigation menu
with sub nav, here is an example I created below. I couldn't get
r:navigation to do it or the navigation_tags extension to work properly.

I'm sure there is a better way to do this so please offer your suggestions
on how to do this if you know of a better way.
*snip*

I had posted this to the list a few days ago:

I tried out what I thought you meant, so I prototyped it out in one of my experimental sites. Would you see the 2 pictures at: http://www.onghu.com/radiant_summer/captures/ - Is this what you want?

The way I did it was using the following code in a snippet - this snippet is included in one of the layouts.

<div id="site_nav">
<r:find url="/en"><r:children:each>
* <r:link /><r:if_ancestor_or_self> ^ </r:if_ancestor_or_self></r:children:each>
</r:find>
</div>

<div id="site_nav">
<r:find url="/en"><r:children:each>
<r:if_ancestor_or_self><r:children:each>
* <r:link /></r:children:each>
</r:if_ancestor_or_self></r:children:each>
</r:find>
</div>

(Actually, this code is slightly different from the one that I used to produce the screen shots. In the first block, I modified the line: * <r:link /><r:if_ancestor_or_self> ^ </r:if_ancestor_or_self></r:children:each>
to include the part for "^" to show the main block that is selected.

Let me know if this helps.

Cheers,
Mohit.
5/13/2009 | 11:26 PM.

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to