WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Superfish has no arrows fo submenu?
  • Print
Pages: [1]   Go Down

Author Topic: Superfish has no arrows fo submenu?  (Read 8451 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Superfish has no arrows fo submenu?
« on: February 07, 2014, 11:19:49 AM »
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: [Select]
<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 :( 

Code: [Select]
<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.
Logged

Offline nibz

  • Posts: 684
  • Gender: Male
Re: Superfish has no arrows fo submenu?
« Reply #1 on: February 07, 2014, 01:53:46 PM »
I think this will work:

Code: [Select]
<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
« Last Edit: February 07, 2014, 03:16:35 PM by nibz »
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Superfish has no arrows fo submenu?
« Reply #2 on: February 07, 2014, 03:10:45 PM »
Oh, yeees, thank you very much It's working perfect, now ;)

I have to study those menu codes somehow ... :|


You're the man ;)

R
Logged

Offline nibz

  • Posts: 684
  • Gender: Male
Re: Superfish has no arrows fo submenu?
« Reply #3 on: February 07, 2014, 03:15:52 PM »
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
« Last Edit: December 31, 2017, 03:45:57 PM by Luisehahne »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Superfish has no arrows fo submenu?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2