# Re: Using a dynamic sub-navigation

**URL:** <https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115>\
**Category:** Radiant CMS\
**Created:** [November 23, 2007, 11:49pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115 "2007-11-23T23:49:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 23, 2007, 11:49pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/1 "2007-11-23T23:49:20Z")

</div>

Hey guys,

I’ve been using the navigation tag extension for a while now ( http://  
[svn.artofmission.com/svn/plugins/radiant/extensions/](http://svn.artofmission.com/svn/plugins/radiant/extensions/)  
navigation\_tags/ ) but upon trying to use it on a new, 0.6.4 gem  
install w/ SQLite3, the \<r:if\_self\> tag just doesn’t want to seem to  
work.

\<r:find url=“/projects/current-urban/kensington”\>  
\<r:children:each order=“desc”\>  
\<li\<r:if\_self\>class=“selected”\</r:if\_self\>\>\<r:link /\>  
\</r:children:each\>  
\</r:find\>

In this scenario, I get the list of children, but not a one ever gets  
the class=“selected” appended to it.

Nobody would happen to know if I am either doing something wrong, OR,  
another way to achieve what I need it to do here?

Thanks in advance,

–  
Travis B.  
Not sent from my iPhone.

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 26, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/2 "2007-11-26T17:11:34Z")

</div>

Travis B. wrote:

> BTW–it seems as though the \<r:nav /\> tag works fine, just not the  
> \<r:if\_self\>. For now I changed my design to accommodate, so all is  
> well. Just an FYI.

Travis – I’m not using that extension but it sounds like the same issue  
I had here: [Tag.globals.actual\_page returning null - Radiant CMS - Ruby-Forum](http://www.ruby-forum.com/topic/131741)

- Dave

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 26, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/3 "2007-11-26T17:42:47Z")

</div>

Yup, sounds exactly what was happening to me.

Any idea if there is a tag I can use now?

–  
Travis B.  
Not sent from my iPhone.

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 26, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/4 "2007-11-26T20:06:01Z")

</div>

Travis B. wrote:

> Yup, sounds exactly what was happening to me.
> 
> Any idea if there is a tag I can use now?

The basic idea is to do a find-and-replace for all instances of  
‘tag.globals.actual\_page’ with ‘tag.globals.page’ in the extension’s  
code.

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 24, 2007, 9:52pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/5 "2007-11-24T21:52:24Z")

</div>

BTW–it seems as though the \<r:nav /\> tag works fine, just not the  
\<r:if\_self\>. For now I changed my design to accommodate, so all is  
well. Just an FYI.

Cheers guys,

–  
Travis B.  
Not sent from my iPhone.

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 28, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/6 "2007-11-28T22:27:29Z")

</div>

Hey David,

This worked with the \<r:if\_ancestor\_or\_self\> tag but no matter what I  
do, I can’t get it to work with the \<r:if\_self\>. This is an extension  
bug no doubt, but I thought I would atleast share my findings.

Thanks for the follow up,

–  
Travis B.  
Not sent from my iPhone.

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 28, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/7 "2007-11-28T23:20:49Z")

</div>

Are using my extension, or another one?

[http://svn.artofmission.com/svn/plugins/radiant/extensions/navigation\_tags/lib/navigation\_tags.rb](http://svn.artofmission.com/svn/plugins/radiant/extensions/navigation_tags/lib/navigation_tags.rb)

---

<div class="post-metadata">

**Author:** ![travisbell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@travisbell](https://www.ruby-forum.com/u/travisbell)\
**Post date:** [November 28, 2007, 11:26pm UTC](https://www.ruby-forum.com/t/re-using-a-dynamic-sub-navigation/121115/8 "2007-11-28T23:26:40Z")

</div>

Hey Ryan,

Yup, that is the one I am using.

–  
Travis B.  
Not sent from my iPhone.
