# Dynamic sub menus, is this possible?

**URL:** <https://www.ruby-forum.com/t/dynamic-sub-menus-is-this-possible/86803>\
**Category:** Radiant CMS\
**Created:** [February 26, 2007, 3:52am UTC](https://www.ruby-forum.com/t/dynamic-sub-menus-is-this-possible/86803 "2007-02-26T03:52:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![block](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/839c29/32.png) [@block](https://www.ruby-forum.com/u/block)\
**Post date:** [February 26, 2007, 3:52am UTC](https://www.ruby-forum.com/t/dynamic-sub-menus-is-this-possible/86803/1 "2007-02-26T03:52:30Z")

</div>

Can’t figure out how to do this with radiant tags:

I have several top level sections (level-1), with several sub sections  
(level-2).

Is it possible to display the following in a submenu and only show  
further children if the current url matches?

e.g. url = /level-2/level-3/

level-2  
level-3  
level-4  
level-4  
level-2  
level-2

---

<div class="post-metadata">

**Author:** ![block](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/839c29/32.png) [@block](https://www.ruby-forum.com/u/block)\
**Post date:** [February 26, 2007, 4:57am UTC](https://www.ruby-forum.com/t/dynamic-sub-menus-is-this-possible/86803/2 "2007-02-26T04:57:44Z")

</div>

Now it is possible, but you’ll probably have to write your own tag. One  
of my recent changesets implemented the ability to tell the actual page  
that is rendering, regardless of where you are in a snippet.  
tag.globals.actual\_page is the thing you’ll check against.

Sean
