WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Superfish has no arrows fo submenu?
(1/1)
Roych:
Hello, I know this was already asked, but I couldnt find the right anwser.
Im having problems implementing the superfish menu in my template so that it would show little arrow for the submenues. The menu and submenus are working fine but there is no arrows for them.
Original html code:
--- Code: ---<nav>
<ul class="sf-menu">
<li class="current"><a href="#">about me</a></li>
<li class="indice"><span></span><a href="#">services</a>
<ul>
<li><a href="#">Consulting</a></li>
<li><a href="#">Education</a>
<ul>
<li><a href="#">auystys uase</a></li>
</ul>
</li>
<li><a href="#">careers</a></li>
</ul>
</li>
<li><a href="#">publications</a></li>
<li><a href="#">links</a></li>
<li><a href="#">contacts</a></li>
</ul>
<div class="clear"></div>
</nav>
--- End code ---
And my sf code: There is span indice class but I dont, know where to put it in my menu. Im no coder :(
--- Code: ---<nav>
<ul class="sf-menu, current">
<?php show_menu2(
$aMenu = 1,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_ALL,
$aOptions = SM2_ALL|SM2_PRETTY,
$aItemOpen = '[li] [a][menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul class="current">',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = '<ul class="sf-menu">',
$aTopMenuOpen = false,
$alastbutton = true
); ?>
</ul>
<div class="clear"></div>
</nav>
--- End code ---
Hope someone can help me here
thank you.
R.
nibz:
I think this will work:
--- Code: ---<nav>
<?php show_menu2(
$aMenu = 1,
$aStart = SM2_ROOT,
$aMaxLevel = SM2_ALL,
$aOptions = SM2_ALL|SM2_PRETTY,
$aItemOpen = '<li class="[if(class==menu-current){current}] [if(class==menu-expand){indice}]">[if(class==menu-expand){<span></span>}][a][menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul>',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = '<ul class="sf-menu">'
); ?>
<div class="clear"></div>
</nav>
--- End code ---
* added current class to work with your code (the default show_menu2 current class is menu-current).
* added indice class when li has subitems.
* removed the "hardcoded" ul wrapper, added this to aTopMenuOpen so it won't add this code twice.
* removed the alastbutton because i don't know where this is needed for, as far as i know this is not a show_menu2 parameter
* to be sure if your theme also needs the <span></span> i added them
Regards Robin
Roych:
Oh, yeees, thank you very much It's working perfect, now ;)
I have to study those menu codes somehow ... :|
You're the man ;)
R
nibz:
--- Quote from: Roych on February 07, 2014, 03:10:45 PM ---I have to study those menu codes somehow ... :|
--- End quote ---
You're welcome.
You can study the menu codes here: Tutorial link removed 404
Navigation
[0] Message Index
Go to full version