[Radiant] Drop down menus?

Sean Cribbs seancribbs at gmail.com
Tue May 27 10:20:17 CDT 2008


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.

Sean

pixelnate at gmail.com wrote:
> I am new to Radiant and using radiant tags, and I am having trouble
> finding a solution for drop-down menus using r:navigation. What I want
> to do is this, similar to the "suckerfish dropdowns" from alistapart.com
> (http://www.alistapart.com/articles/dropdowns) :
>
> <ul>
> 	<li>Menu Item 1</li>
> 		<ul>
> 			 <li>Sub Menu Item 1</li>
> 			<li>Sub Menu Item 2</li>
> 			<li>Sub Menu Item 3</li>
> 		</ul>
> 	<li>Menu Item 2</li>
> 	<li>Menu Item 3</li>
> </ul>
>
> Are there any facilities for this in r:navigation or do I need to cobble
> this together by hand? Thanks in advance.
>
>
> ~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