Dynamic sub menus, is this possible?

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

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