I found the r:navigation tag become too limited to do that kind of stuff.
See below for an example of how to do your navigation "by hand".

<div id="navigation">
  <ul class="navi">
    <li id="Home" class="<r:if_url
matches="^/$">active</r:if_url><r:unless_url
matches="^/$">inactive</r:unless_url>"><a href="/">Home</a></li>
    <r:find url="/">
      <r:children:each>
        <li id="<r:slug />"
class="<r:if_ancestor_or_self>active</r:if_ancestor_or_self><r:unless_ancestor_or_self>inactive</r:unless_ancestor_or_self>">
          <r:link />
          <r:if_ancestor_or_self>
            <r:if_children>
              <ul class="navi_sub">
                <r:children:each>
                  <li id="<r:slug />"
class="<r:if_self>active</r:if_self><r:unless_self>inactive</r:unless_self>"><r:link/></li>
                </r:children:each>
              </ul>
            </r:if_children>
          </r:if_ancestor_or_self>
        </li>
      </r:children:each>
    </r:find>
  </ul>
</div>

On Thu, Oct 16, 2008 at 9:56 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote:
> In the below case, I would want the About link to be highlighted,
> since that's the closest match to the current page.  Is there a good
> way to do that?
>
> Joe
>
> On Thu, Oct 16, 2008 at 12:39 PM, Sean Cribbs <[EMAIL PROTECTED]> wrote:
>> Yes.  Use <r:here> if you want exact matches.  However, often I just break
>> out the navigation special cases (Home is a typical one).
>>
>> Sean
>>
>> Joe Van Dyk wrote:
>>>
>>> <ul class="sidemenu">
>>> <r:navigation urls="Home: / | About: /about" >
>>>   <r:normal><li><a href="<r:url/>"><r:title /></a></li></r:normal>
>>>   <r:selected><li class='selected'><a href="<r:url />"><r:title
>>> /></a></li></r:selected>
>>> </r:navigation>
>>> </ul>
>>>
>>> Say I'm on the page /about/page.  Won't both the Home and the About
>>> links have the 'selected' class specified?  Since /about/page is a
>>> child of both those pages?
>>>
>>> Joe
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant@radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>
>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
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