Commit 0ae21f5c authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Added submenu rendering

parent c795677d
......@@ -17,3 +17,11 @@
#mainnav li.selected {
font-weight: bold;
}
#subnav li {
display: inline;
}
#subnav li.selected {
font-weight: bold;
}
......@@ -26,12 +26,23 @@
{if $MAINNAV}
<ul id="mainnav">
{foreach from=$MAINNAV item=item}
{if $item.selected}
{if $item.selected}{assign var=MAINNAVSELECTED value=$item}
<li class="selected"><a href="{$item.link|escape}">{str section=$item.section tag=$item.name}</a></li>
{else}
<li><a href="{$item.link|escape}">{str section=$item.section tag=$item.name}</a></li>
{/if}
{/foreach}
</ul>
{if $MAINNAVSELECTED.submenu}
<ul id="subnav">
{foreach from=$MAINNAVSELECTED.submenu item=item}
{if $item.selected}{assign var=MAINNAVSELECTED value=$item}
<li class="selected"><a href="{$item.link|escape}">{str section=$item.section tag=$item.name}</a></li>
{else}
<li><a href="{$item.link|escape}">{str section=$item.section tag=$item.name}</a></li>
{/if}
{/foreach}
</ul>
{/if}
{/if}
{insert name="messages"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment