[Radiant] r:navigation help

Lionel Mestre lionel at 50horizons.com
Mon Nov 27 06:21:43 CST 2006


r:normal is the nav element display when that element is not related to  
the active page.
r:here is the nav element display when that element is for the active page.
r:selected is the nav element display when that element is a parent of the  
active page

Depending the sort of menu you want to output you can use li tags without  
separator and with class attribute.
Here an example :

<ul id="nav">
<r:navigation urls="Characteristics: /en/characteristics; Quality:  
/en/quality; Projects: /en/projects/; Journal: /en/journal/; Contact:  
/en/contact/ ">
   <r:normal><li><a href="<r:url/>"><r:title /></a></li></r:normal>
   <r:here><li><a class="activelink" href="<r:url />"><r:title  
/></a></li></r:here>
   <r:selected><li><a class="activelink" href="<r:url />"><r:title  
/></a></li></r:selected>
   <r:between></r:between>
</r:navigation>
</ul>


You can use simple text with no specific class :
     <r:navigation urls="English: /en/; Srpski: /sr/">
       <r:normal><a href="<r:url />"><r:title /></a></r:normal>
       <r:here><r:title /></r:here>
       <r:selected><r:title /></r:selected>
       <r:between> | </r:between>
     </r:navigation>


Last an example where the here and selected and not the same :
<ul class="sidemenu">
<r:navigation urls="Overview: /en/projects/p1/; Situation:  
/en/projects/p1/situation/; Explore: /en/projects/p1/explore/; Land:  
/en/projects/p1/land/; Plan: /en/projects/p1/plan/; Team:  
/en/projects/p1/team/">
   <r:normal><li><a href="<r:url/>"><r:title /></a></li></r:normal>
   <r:here><li class="selected"><r:title /></li></r:here>
   <r:selected><li><a href="<r:url />"><r:title /></a></li></r:selected>
   <r:between></r:between>
</r:navigation>
</ul>



As it is not possible to order the children of a page it is probably best  
to explicitly put the list of links as in the examples above.

lionel


On Mon, 27 Nov 2006 01:23:30 +0100, BJ Clark <scidept at gmail.com> wrote:

> Hello all,
> Another n00b question for you guys.
> I'm trying to generate a list block of all the published children of
> my home page.
> I'm assuming, via the UsingRadiant page on the wiki, that I need to use:
> <r:navigation urls="[Title: url; Title: url; ...]">
>     <r:normal><a href="<r:url />"><r:title /></a></r:normal>
>     <r:here><strong><r:title /></strong></r:here>
>     <r:selected><strong><a href="<r:url />"><r:title
> /></a></strong></r:selected>
>     <r:between> | </r:between>
>   </r:navigation>
>
> First, what should I be putting in the "Title: url" section? Somethign
> about r:children?
> Second, I don't understand what the r:normal, r:here and r:selected
> stuff are doing. Shouldn't that be rendering different "class=" or
> something?
>
> Is there anywhere else on the wiki that talks about this?
> Thanks
> BJ Clark
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



-- 
Lionel Mestre
50horizons.com



More information about the Radiant mailing list