WebsiteBaker Support (2.8.x) > Templates, Menus & Design
css span class inside menu?
JonH:
How do I place a css span class inside the menu? I need the current state to have a small arrow image inside it.
I use this menu: <?php show_menu2(1, SM2_ROOT+1, SM2_START); ?>
Please help
BerndJM:
Please help yourself ...
...and read the SM2 documentation.
--- Code: ---The complete call signature and default parameter value for show_menu2 is:
show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_CURR+1,
$aOptions = SM2_TRIM,
$aItemOpen = '[li][a][menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '[ul]',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
)
--- End code ---
You can style all the parameters to fullfill your needs.
Regards Bernd
BlueNC:
First off: Thanks Bernd for your insight and help in this matter. First I tried to achieve a similar result with what was in the documentation but that did not work out. With your example be 'redeclaring all variables' all works fine.
However: One question remains:
Currently I have this:
--- Code: ---echo show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT+1,
$aMaxLevel = SM2_CURR+1,
$aOptions = SM2_TRIM,
$aItemOpen = '[li][a][menu_title]</a>',
$aItemClose = '</li> ~ ',
$aMenuOpen = '[ul]',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
)
--- End code ---
And it renders nicely, but now I would like to have the first item to start like this ~ [link] ~
Is there a way to determine the first link and then add the symbol to the left, without resorting to JS ?
Thanks for any pointers and help - my apologies if this question has been asked / answered previously, apparently I am just not entering the correct search term.
Stefek:
--- Quote from: BlueNC on May 21, 2010, 06:13:28 PM ---Is there a way to determine the first link and then add the symbol to the left
--- End quote ---
--- Quote from: BlueNC on May 21, 2010, 06:13:28 PM ---my apologies if this question has been asked / answered previously
--- End quote ---
Please read the SM2 Help FIle.
You'll find it inside the module.
Regards,
Stefek
BlueNC:
Stefek: Danke...
Habe gerade mit Website baker angefangen und bin noch nicht so versiert darin.
Navigation
[0] Message Index
[#] Next page
Go to full version