WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: jamie84 on September 10, 2009, 09:56:07 AM
-
<?php show_menu(); ?> Displays the menu. Where could I edit the layout for each link? (What I'm trying to do is add some div's around each link.)
Hmmmm...
-
Hi
<?php show_menu(); ?>
is an old function that can be replaced with
<?php show_menu2(); ?>
SM2 is included in package WB 2.7 or 2.8, please have a look to the demo and documentation (http://www.websitebakers.de/sm2/).
rgds
erpe
-
No...
I mean what file something like this would be in...
function show_menu(
$aMenu = 1,
$aStartLevel = 0,
$aRecurse = -1,
$aCollapse = true,
$aItemTemplate = '<li><span[class]>[a][menu_title][/a]</span>',
$aItemFooter = '</li>',
$aMenuHeader = '<ul>',
$aMenuFooter = '</ul>',
$aDefaultClass = ' class="menu_default"',
$aCurrentClass = ' class="menu_current"',
$aParent = 0
)
That was found in /modules/show_menu2/legacy.php
I need to edit the backbone that lays out all the links in the menu.
It currently displays links as:
<li><span class="menu_current"><a href="http://127.0.0.1/cms" target="_top" class="menu_current"> Home </a></span>
</li>
But I want to change it to:
<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>
-
Yes
please read the docu , insert a code like
<?php show_menu2(0,SM2_ROOT, SM2_ALL,SM2_TRIM|SM2_PRETTY); ?>
read the html output and format the classes............ ...
rgds
erpe
-
<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>
How many levels has your Menu.
Also the "output" you provide is a little to little :-D
Give at least 3 Menu Items in your Output.
If you have also subLevels, show also the output of them.
I wonder why you want to obstain from list-items <li> in you menu.
But anyway, with ShowMenu2 it is possible, of course.
Regards,
Stefek