<div id="nav"> <?php show_menu2(0, SM2_ROOT, SM2_ALL, ( SM2_ALL | SM2_NUMCLASS), '<li><a href="[url]" class="[class] navlev[level]">[menu_title]</a>', "</li>", '<ul class="ullev[level]">', "</ul>", true, '<ul id="header_menu" class="menu">'); //show_menu2(0, SM2_ROOT, SM2_ALL, ( SM2_ALL | SM2_NUMCLASS), false, "\n</li>", false, false, false, '<ul id="header_menu" class="menu">'); ?><br style="clear:left;"/> </div><!-- end nav -->
... show_menu2 is great, but not very easy to use. So, I thought about something like a backend, or even a "code generator". You may think of it as a "Wizard" where you make some choices an get the correct SM2 code to use.Would that be something of interest?
show_menu2(2, SM2_ROOT, SM2_START, SM2_ALL,'<a href="[url]" target="[target]" class="home">[menu_title]','</a>','','');
<?php show_menu2(0, SM2_ROOT, SM2_ALL, '<li>[a] [if(id=current){id="current_tab"}] [menu_title] [/a]</li>'); ?>
Having a coding quandry... Have used show_menu2 with alot of sites. But this time a customer haded over a template that is very convoluded and complex. And the css is damned near unreadable.
History4.8 (8 Apr 2009)Fixed output of menu when a hidden page is the current or parent page.