[Radiant] Drop down menus?
Sean Cribbs
seancribbs at gmail.com
Tue May 27 10:44:42 CDT 2008
There are two tags that you'll be interested in, and I'll let you figure
out where to place them. The first is <r:if_self> which will output its
contents if the local page (within an iteration) is the same as the
global page (the one rendering).
The second is <r:if_ancestor_or_self> which will do the same but also
renders if the local page is an ancestor of the global page. You should
be able to use these to accomplish the same effect as <r:here> and
<r:selected> in the navigation tag.
Sean
pixelnate at gmail.com wrote:
> On Tue, 2008-05-27 at 10:20 -0500, Sean Cribbs wrote:
>
>> Nate,
>>
>> It depends on how you want to generate those menus. <r:navigation> is
>> best for single list navigation menus that have highlighting, not nested
>> menus. However, assuming you'll be generating the navigation from the
>> page structure, you could do something like this:
>>
>> <r:find url="/">
>> <ul>
>> <r:children:each>
>> <li><r:link/>
>> <r:if_children>
>> <ul>
>> <r:children:each><li><r:link /></li></r:children:each>
>> </ul>
>> </r:if_children></li>
>> </r:children:each>
>> </ul>
>> </r:find>
>>
>> That will generate a list based on the homepage's children and
>> grandchildren pages.
>>
>
> OMG! Are you kidding me? It's that easy? I am really loving the switch
> to Radiant.
>
> One question though, I am using r:navigation to show the current page
> with :here and :selected methods(?), so how would this work with the
> markup you described?
>
>
> ~Nate
>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
More information about the Radiant
mailing list