Superfish has no arrows fo submenu?

nibz

#4
Quote from: Roych on February 07, 2014, 03:10:45 PM
I have to study those menu codes somehow ... :|

You're welcome.
You can study the menu codes here: Tutorial link removed 404

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

#2
I think this will work:


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



  • 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

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



And my sf code: There is span indice class but I dont, know where to put it in my menu. Im no coder :( 

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


Hope someone can help me here

thank you.

R.