Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 03:26:10 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155541 Posts in 21713 Topics by 7737 Members
Latest Member: simpleguy3
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Drop-down menu in WB  (Read 1522 times)
mikejd

Offline Offline

Posts: 160


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

Offline Offline

Posts: 17


« 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
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



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

Alle großen Veränderungen beginnen im Kleinen
mikejd

Offline Offline

Posts: 160


« 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
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



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

Alle großen Veränderungen beginnen im Kleinen
mikejd

Offline Offline

Posts: 160


« Reply #5 on: February 22, 2011, 12:35:42 PM »

Thanks Blackbird, that looks straightforward.

regards,
Mike
Logged
BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



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

Alle großen Veränderungen beginnen im Kleinen
topper

Offline Offline

Posts: 24


« Reply #7 on: May 10, 2011, 04: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
Xagone
AddOn Development
*
Offline Offline

Posts: 478



WWW
« Reply #8 on: May 10, 2011, 04: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://www.xagone.com/
nene

Offline Offline

Posts: 56


« Reply #9 on: July 27, 2011, 06: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
dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #10 on: July 27, 2011, 11:13:44 AM »

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:
<?php     
   show_menu2(
                        
$aMenu 0,
        $aStart SM2_ROOT,
$aMaxLevel SM2_ALL,
$aOptions SM2_ALL|SM2_PRETTY,
$aItemOpen '[li] <a href="[url]" target="[target]" class=[if(class==menu-expand){"dir"}else{""}]>[menu_title]</a>',
$aItemClose '</li>',
$aMenuOpen '<ul>',
$aMenuClose '</ul>',
$aTopItemOpen false,
$aTopMenuOpen '<ul id="nav" class="dropdown dropdown-horizontal">'
); 
?>
Logged

BlackBird
AddOn Development
*
Offline Offline

Posts: 2069



WWW
« Reply #11 on: July 27, 2011, 11:55:08 AM »

I helped via PN, but I don't know if it's solved now.
Logged

Alle großen Veränderungen beginnen im Kleinen
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!