[Radiant] Question about navigation behavior
John W. Long
ng at johnwlong.com
Mon Sep 4 10:11:30 CDT 2006
Raine Virta wrote:
> It works, partially.
> My index page is / and other pages are like /page/, so with current
> settings index page's and other page's links are both selected when user
> is in other page. Possible solution could be having /home/ or something
> like that as default page, but how do I do that?
Right. That's because the home page is the parent of the other pages. So
the home page will always be rendered with selected or here. For now the
best fix is to use two navigation tags. Something like this:
<ul>
<r:navigation urls="home:/">
<r:normal><li><a href="<r:url />"><r:title /></a></li></r:normal>
<r:here><li class="here"><a class="here" href="<r:url />"><r:title
/></a></li></r:here>
<r:selected><li><a href="<r:url />"><r:title /></a></li></r:selected>
</r:navigation>
<r:navigation urls="home:/;ruby:/ruby/">
<r:normal><li><a href="<r:url />"><r:title /></a></li></r:normal>
<r:here><li class="here"><a class="here" href="<r:url />"><r:title
/></a></li></r:here>
<r:selected><li class="selected"><a class="seleted" href="<r:url
/>"><r:title /></a></li></r:selected>
</r:navigation>
</ul>
--
John Long
http://wiseheartdesign.com
More information about the Radiant
mailing list