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 »
  • Drop-down menu in WB
  • Print
Pages: [1]   Go Down

Author Topic: Drop-down menu in WB  (Read 9374 times)

Offline mikejd

  • Posts: 251
Drop-down menu in WB
« on: February 21, 2011, 07:04:48 PM »
Hi,

I would like to add a drop-down horizontal navigation menu on  site I am designing. There are many downloadable menus, probably too many to test, so I would like to ask if anyone can recommend a suitable one which they have used.

Ideally I would want it to be css only but can accept that Javascript may be needed to cater for IE. And obviously it should be easy to implement in WB.

Any advice welcome.

Mike Davies
Logged

Offline rcma

  • Posts: 17
Re: Drop-down menu in WB
« Reply #1 on: February 22, 2011, 11:23:02 AM »
its in German but this will help i hope!!!

http://www.websitebakers.de/tutorials/topics/dropdown-menues.php
Logged

Offline BlackBird

  • Posts: 2573
Re: Drop-down menu in WB
« Reply #2 on: February 22, 2011, 11:25:55 AM »
If there's a menu you like here

http://lwis.net/free-css-drop-down-menu/

I can show you how to implement it in WB.
Logged
http://wbaddons.webbird.de Don't miss this

Offline mikejd

  • Posts: 251
Re: Drop-down menu in WB
« Reply #3 on: February 22, 2011, 11:50:04 AM »
Hi Blackbird,
The simple horizontal drop-down looks to be what I am looking for. Advice on implementing would be appreciated.

regards,
Mike
Logged

Offline BlackBird

  • Posts: 2573
Re: Drop-down menu in WB
« Reply #4 on: February 22, 2011, 12:20:04 PM »
You may include the CSS directly into your template. Just download the framework and copy the appropriate files into your template folder. Copy this into your template's index.php (head section):

Code: [Select]
<link href="css/dropdown/themes/default/helper.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/dropdown/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/dropdown/themes/default/default.css" media="screen" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script>
<![endif]-->

(These should also be the files you need to copy)

Now you will have to add the CSS classes to your show_menu2() call. The <ul> needs to have the ID "nav" and the CSS classes "dropdown dropdown-horizontal".

That's all.
Logged
http://wbaddons.webbird.de Don't miss this

Offline mikejd

  • Posts: 251
Re: Drop-down menu in WB
« Reply #5 on: February 22, 2011, 12:35:42 PM »
Thanks Blackbird, that looks straightforward.

regards,
Mike
Logged

Offline BlackBird

  • Posts: 2573
Re: Drop-down menu in WB
« Reply #6 on: February 22, 2011, 02:12:39 PM »
Just one note: Maybe the CSS files include other CSS files with @import(). So if the result doesn't look like expected, take a look into the files to see if there are more files to copy.
Logged
http://wbaddons.webbird.de Don't miss this

Offline topper

  • Posts: 24
Re: Drop-down menu in WB
« Reply #7 on: May 10, 2011, 05:15:21 PM »
Hi, BlackBird


I wonder if its possible to use this menu with sm2.

http://lwis.net/free-css-drop-down-menu/dropdown.lwis.celebrity.horizontal.html

regards
topper
Logged

Offline Xagone

  • Posts: 482
  • Gender: Male
  • Developper
    • Xagone Inc
Re: Drop-down menu in WB
« Reply #8 on: May 10, 2011, 05:27:06 PM »
BlackBird, yes
but messy

your hierarchy would be something like :
- Home
- About
-- about us
--- menu subitem 1
--- menu subitem 2
--- menu subitem 3
--- menu subitem 4
-- facts
--- menu subitem 1
--- menu subitem 2
--- menu subitem 3
--- menu subitem 4
-- teams
--- menu subitem 1
--- menu subitem 2
--- menu subitem 3
--- menu subitem 4
- Services
- Products
- Contacts

with a sm2 having "conditionnal" showing
Logged
Xagone Inc. (formerly VotreEspace)
http://xagone.com/

Offline nene

  • Posts: 59
Re: Drop-down menu in WB
« Reply #9 on: July 27, 2011, 07:26:57 AM »
Its not working for me. What did I do wrong?

I have copied all necessary or needed files to my template folder as directed.

I added the following to the head section of my index.php file
<link href="/css/dropdown/themes/default/helper.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/dropdown/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/dropdown/themes/default/default.css" media="screen" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script>
<![endif]-->

<!-- / END -->

and

<div id="topnav">
    <?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, "\n</li>", false, false, false, '<ul id="nav" class="dropdown dropdown-horizontal">'); ?>
    </div>

to call the menu

Pls help.

Regards
Nene Nanor
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8915
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Drop-down menu in WB
« Reply #10 on: July 27, 2011, 12:13:44 PM »
give us a link.

for showing arrows you need the class "dir" for <li> or <a>.
i have tried the menu with modul LibraryAdmin and it works for me with this SM2
Code: [Select]
<?php     
   show_menu2(
                        $aMenu = 0,
        $aStart = SM2_ROOT,
$aMaxLevel = SM2_ALL,
$aOptions = SM2_ALL|SM2_PRETTY,
$aItemOpen = &#39;[li] <a href="[url]" target="[target]" class=[if(class==menu-expand){"dir"}else{""}]>[menu_title]</a>&#39;,
$aItemClose = &#39;</li>&#39;,
$aMenuOpen = &#39;<ul>&#39;,
$aMenuClose = &#39;</ul>&#39;,
$aTopItemOpen = false,
$aTopMenuOpen = &#39;<ul id="nav" class="dropdown dropdown-horizontal">&#39;
); 
?>
Logged
https://onkel-franky.de

Offline BlackBird

  • Posts: 2573
Re: Drop-down menu in WB
« Reply #11 on: July 27, 2011, 12:55:08 PM »
I helped via PN, but I don't know if it's solved now.
Logged
http://wbaddons.webbird.de Don't miss this

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Drop-down menu in WB
 

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