WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Help with menu... :O

(1/1)

jamie84:
<?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...

erpe0812:
Hi


--- Quote ---<?php show_menu(); ?>
--- End quote ---
is an old function that can be replaced with

--- Code: ---<?php show_menu2(); ?>
--- End code ---

SM2 is included in package WB 2.7 or 2.8, please have a look to the demo and documentation.

rgds

erpe

jamie84:
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:


--- Code: ---<li><span class="menu_current"><a href="http://127.0.0.1/cms" target="_top" class="menu_current"> Home </a></span>
</li>
--- End code ---

But I want to change it to:


--- Code: ---<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>
--- End code ---


erpe0812:
Yes

please read the docu , insert a code like


--- Code: ---<?php show_menu2(0,SM2_ROOT, SM2_ALL,SM2_TRIM|SM2_PRETTY); ?>
--- End code ---

read the html output and format the classes............ ...

rgds

erpe

Stefek:

--- Quote from: jamie84 on September 10, 2009, 12:01:36 PM ---

--- Code: ---<div class="navitem"><a href="http://127.0.0.1/cms><span id="homeicon" class="navicon"></span>Home</a></div>
--- End code ---


--- End quote ---
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

Navigation

[0] Message Index

Go to full version