WebsiteBaker Support (2.8.x) > Templates, Menus & Design
a:current?
Stefek:
Dear Irene,
you did it right.
You only forgot your css file.
Change/Expand the following selector:
#nav li a:hover {
to:
#nav li a:hover,#nav li.active a {
and you'll get there..
Kind Regards,
Stefek
Ogierini:
Thanks Stefek, IT WORKED! :-D
There is just 1 minor thing left: the "#nav ul ul li" are shown in the menu, while I want them only to be shown when clicked on the "#nav li"
Can I delete the _ROOT from: $aStart = SM2_ROOT,
?
Stefek:
Do I understand right, you want this behaviour only for the parents, not for its childs?
R,
Stefek
Ogierini:
yeah that's right!
Stefek:
In that case, use the following CM2 call:
( only $aItemOpen changed):
--- Code: ---<?php
show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_CURR+1,
$aOptions = SM2_ALL,
$aItemOpen = '<li [if(level==0 && class==menu-current){class="active"}]>[if(class==menu-current) { [a]<span>[menu_title]</span>} else {[a][menu_title]}]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul class="mymenu">',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
);
?>
--- End code ---
This should do the trick.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version