Dropdown menu

Dropdown menu, a forum discussion on Jojo CMS. Join us for more discussions on Dropdown menu on our General Discussion forum.

Back to Forum Index : Back to General Discussion   RSS
lynchpin

26 Jul 2008
Posts: 60

I am working on integrating a layout that uses a dropdown menu for navigation.
Do you have any existing code that does this already?
I would guess you have run into this before?
This is the design I am working on:
http://208.67.84.208/~newdir/layout/

Thanks
Harvey

Core Developer

Harvey

30 Jul 2008
Posts: 327

Try adding this to the global.php
$smarty->assign('menu', $page->getMenu('main', Jojo::getOption('mainnavdepth', 3)));

Then in the template, use:
{$menu}


This is what I use on a number of sites, it creates a standard multi-level bullet list menu (up to you to style it). This is a little more resource intensive than the other method, but quite easy to work with. I notice your menu had some extra behaviours attached in the HTML - if you use this method you will need to attach those behaviours using jquery, which shouldn't be too hard to do.
lynchpin

30 Jul 2008
Posts: 60

that did the trick.
Thanks Harvey.
raulandres

19 Jul 2009
Posts: 35

i added the line in global.php: $smarty->assign('menu', $page->getMenu('main', Jojo::getOption('mainnavdepth', 3)));

only appear the submenu when browse the homepage, when i browse another pages submenu is hide, how to show it?

thx!

Back to Forum Index : Back to General Discussion   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.