pyrocms/pyrocms — pull request #2073 by foobarHD (2012-12-01 19:45:23+00:00)
Title: Update system/cms/modules/navigation/plugin.php

I found the addition of "current" was easier to test against when checking if the selected menu item was actually the current. {{ if current }} is the usage instead of checking for {{if class == 'current' or class == 'last current or .... }}

Also, the level addition allows for you to have a little extra control over submenus when using *recursive children*. I have the following in my menu (using a select box):

<option value="{{ url }}" {{ if current }} selected="selected"{{ endif }}>
{{ if level > 0 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ endif }}
{{ if level > 1 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ endif }}
{{ if level > 2 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ endif }}
{{ if level > 3 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ endif }}
{{ if level > 4 }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ endif }}
{{ title }}
</option>

It adds extra spaces to indent the options based on what level they are. Some might find it useful?