# Navigation - current page tree branch/section

**URL:** <https://www.ruby-forum.com/t/navigation-current-page-tree-branch-section/98769>\
**Category:** Radiant CMS\
**Created:** [July 18, 2006, 1:07am UTC](https://www.ruby-forum.com/t/navigation-current-page-tree-branch-section/98769 "2006-07-18T01:07:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brogoz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brogoz](https://www.ruby-forum.com/u/brogoz)\
**Post date:** [July 18, 2006, 1:07am UTC](https://www.ruby-forum.com/t/navigation-current-page-tree-branch-section/98769/1 "2006-07-18T01:07:33Z")

</div>

Let’s say I have a page hierarchy like this:

- about

- publications

- contact

and I use navigation tag in order to produce top navigation like this:

\<r:navigation urls=“About: /about; Publications: /publications; Contact:  
/contact”\>

\<r:normal\>

- \<r:title /\>
\</r:normal\>

\<r:here\>

- \<r:title

/\>

\</r:here\>

\</r:navigation\>

When I’m on ‘css’ page I would like to still have class=‘current’ on

‘publications’ in order to inform my users in which page tree  
branch/section

they are…

Is there an easy way to achieve this using this tag (I mean

‘navigation’)? If not what would be the easiest way?

Thanks in advance for suggestions.

Bartek

---

<div class="post-metadata">

**Author:** ![brogoz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brogoz](https://www.ruby-forum.com/u/brogoz)\
**Post date:** [July 18, 2006, 2:09am UTC](https://www.ruby-forum.com/t/navigation-current-page-tree-branch-section/98769/2 "2006-07-18T02:09:17Z")

</div>

From [http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/](http://dev.radiantcms.org/radiant/browser/trunk/radiant/app/)  
models/page\_context.rb :

# 

# \<r:navigation urls=“[Title: url; Title: url; …]”\>

# \<r:normal\>\<r:title /\>\</r:normal\>

# \<r:here\> **\<r:title /\>** \</r:here\>

# \<r:selected\> **\<r:title /\>** \</

r:selected\>

# \<r:between\> | \</r:between\>

# \</r:navigation\>

# 

# Renders a list of links specified in the ‘urls’ attribute according

to three

# states:

# 

# \* ‘normal’ specifies the normal state for the link

# \* ‘here’ specifies the state of the link when the url matches the

current

# page’s url

# \* ‘selected’ specifies the state of the link when the current

page matches

# is a child of the specified url

# 

# The ‘between’ tag specifies what sould be inserted inbetween each

of the links.

# 

I believe what you’re looking for is the “selected” tag.

James
