How to make <r:navigation.. keep "here" class on li

Does anyone have an idea on how to create a navigation menu using
standard Radiant/Radius tags in which the parent item keeps a “here”
class as long as any child, grandchild, great-grandchild, etc. is the
current page?

Currently the <r:navigation… tag doesn’t seem to accmodate this
option.

I guess I could override and extend that tag, create my own, or
perhaps accomplish this with just an iteration through the page tree
using a combination of more elemental Radius tags?

Has anyone already addressed this situation. It should be common enough.

Thanks,

Loren J.
[email protected]

Loren J. wrote:

Does anyone have an idea on how to create a navigation menu using
standard Radiant/Radius tags in which the parent item keeps a “here”
class as long as any child, grandchild, great-grandchild, etc. is the
current page?

Have you tried using “selected” within the navigation tag?

http://radiantcms.org/blog/2006/06/15/tag-primer-2/

Thanks,

Bryan

Ok, I’ve been doing too many things at once.

The “<r:selected” tag does handle this just fine. Sorry to waste
bandwidth :-/

Bryan, thanks for the response before.

On Oct 9, 2006, at 8:41 AM, Loren J. wrote:

<r:selected>

  • <r:title />
  • </
    currently selected:
    I think I’ve looked at the code for the navigation tag closely

    the


    Radiant mailing list
    Post: [email protected]
    Search: http://radiantcms.org/mailing-list/search/
    Site: http://lists.radiantcms.org/mailman/listinfo/radiant

    Loren J.
    [email protected]

    Yes I’m currently employing the selected tag under navigation, here
    is my current navigation code:

    This works fine if I a page is simply a child of a listed url,
    however if a page is a grandchild, great-grandchild, etc. then the
    parent/grandparent link is no longer in a selected state (I should
    have made that clearer).

    See this link for a screenshot which shows the News “tab” currently
    selected:

    http://www.fn-group.com/clients/diopa/diopa_news.jpg

    On this page tag/page you’ll see a series of links under the heading
    “Bishop’s Column” (November Article, December Article, etc.) If you
    were to click on December Article for instance the breadcrumb would
    read “Home > News > Bishop’s Column > December Article” and the News
    “tab” should still be currently selected (though right now it
    wouldn’t be).

    I think I’ve looked at the code for the navigation tag closely enough
    to now know that this isn’t an option as-is.

    Are any additional options within the navigation control currently on
    the table? I would think that building-in some sort of option such as
    “selected_if_grandchild” could have universal application. If not,
    what would be my next best option?

    Has anyone else dealt with this sort of nav scheme in Radiant yet?

    Thanks,

    Loren

    On Oct 8, 2006, at 6:04 PM, Bryan wrote:

    Site: http://lists.radiantcms.org/mailman/listinfo/radiant
    Loren J.
    [email protected]

    Loren J. wrote:

    Ok, I’ve been doing too many things at once.

    The “<r:selected” tag does handle this just fine. Sorry to waste
    bandwidth :-/

    Bryan, thanks for the response before.

    Loren,

    I am glad to hear that it worked out. That tag gave me some trouble too
    when I first used it.

    Bryan

    This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

    | Privacy Policy | Terms of Service | Remote Ruby Jobs