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.8 is now available!


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 »
  • Problem implementing a menu?
  • Print
Pages: [1]   Go Down

Author Topic: Problem implementing a menu?  (Read 8477 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Problem implementing a menu?
« on: October 02, 2013, 06:06:57 PM »
Hello,

Im having some problems implementing WB menu to my html template (it's live and wb ready) I tried almost anything that I could think of but Im not a coder so somehow I can't figure it out.

Wherever I put this id doesnt come up or it's not with css style.

I have a horizontal menu with couple submenus.

my html code looks like this:
Code: [Select]
<div class="nav-border">
              <div class="container">
                  <div class="navbar navbar_ clearfix row">
                     <div class="navbar-inner span12">                                                
                        <div class="nav-collapse nav-collapse_ collapse">
                          <ul class="nav sf-menu clearfix">
                            <li class="active"><a href="index.html">Main</a></li>
                            <li class="sub-menu"><a href="index-1.html">About</a>
                              <ul>
                                <li><a href="index.htm#">Studio</a></li>
                                <li><a href="index.htm#">Teachers</a></li>
                                <li><a href="index.htm#">Dance styles</a></li>
                                <li><a href="index.htm#">Schedule</a></li>
                                <li><a href="index.htm#">Competitions</a></li>
                                <li><a href="index.htm#">Gallery</a></li>
                              </ul>
                            </li>
                            <li><a href="index-2.html">Teachers</a></li>
                            <li><a href="index-3.html">Events</a></li>
                            <li><a href="index-4.html">Videos</a></li>
                            <li><a href="index-5.html">Presentation</a></li>
                            <li><a href="index-6.html">Contacts</a></li>
                          </ul>
                        </div>
                      </div>
                   </div>
                 </div>  
             </div>  


An I dont know where to put the WB code to make it work

I use this (IF THIS IS RIGHT AT ALL)

Code: [Select]
<?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="menu">',
        
$aMenuClose     = '</ul>',
        
$aTopItemOpen   = false,
        
$aTopMenuOpen   = false
        
); ?>

Help needed please!

Roych
Logged

Offline nibz

  • Posts: 684
  • Gender: Male
Re: Problem implementing a menu?
« Reply #1 on: October 02, 2013, 06:24:58 PM »
Hi Roych,

Seems you are using Superfish menu.
This should work (untested):
Code: [Select]
<div class="nav-border">
<div class="container">
<div class="navbar-inner span12">
<div class="nav-collapse nav-collapse_ collapse">
<?php
show_menu2(
        $aMenu          = 1,
        $aStart         = SM2_ROOT,
        $aMaxLevel      = SM2_ALL,
        $aOptions       = SM2_ALL|SM2_PRETTY,
        $aItemOpen      = '<li class="[class] [if(class==menu-current){active}] [if(class==menu-expand){sub-menu}]">[a][menu_title]</a>',
        $aItemClose     = '</li>',
        $aMenuOpen      = '<ul>',
        $aMenuClose     = '</ul>',
        $aTopItemOpen   = false,
        $aTopMenuOpen   = '<ul class="nav sf-menu clearfix">'
    );
?>

</div>
</div>
</div>
</div>

This is a replacement for the complete code you posted.
« Last Edit: October 02, 2013, 07:58:46 PM by nibz »
Logged

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Problem implementing a menu?
« Reply #2 on: October 02, 2013, 06:42:54 PM »
You're the man its working now thank you very much.

I just had tu put back the
Code: [Select]
<ul class="nav sf-menu clearfix">cause some css displacement occured.

Just what I needed.

Thank you very, very much again ;)  :wink:

Roych
Logged

Offline nibz

  • Posts: 684
  • Gender: Male
Re: Problem implementing a menu?
« Reply #3 on: October 02, 2013, 08:00:30 PM »
Edited my code.

I put the code from aMenuOpen to aTopMenuOpen.
Now the topmenu opens with <ul class="nav sf-menu clearfix">
and the submenu's will open wit <ul>.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Problem implementing a menu?
 

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