WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Need a top-level menu item without a page
jbs:
I'm using a template with a drop-down menu. We would like a couple of the top-level menu items to be basically disabled so they don't go anywhere, but be able to show the second-level items in the drop-down. On standard links, we can use "#" but I can't find any way to make the equivalent concept work on a menu item. Anyone else tried doing this? Any ideas?
To show what I mean, the website is www.releaseinternational.org. They want the "Find Out More" and "Take Action" links at the top to not go to a page, but simply display the menu items under it.
pieterb:
Hi jbs,
You can create a menu link in stead of an actual page with wysiwyg. You can link this menu link to the first page of the submenu. So the "Find Out More" and "Take Action" items remain links, but go directly to the first subpage.
DarkViper:
Simply click 'Home' on top of this side and then explore the menu.
snark:
--- Code: ---<div id="nav">
<?php show_menu2(1, SM2_ROOT, SM2_MAX+1, SM2_ALL, '<li>[if( level == 0 ){<a>[menu_title]</a>}else{<a href="[url]" class="[class] navlev[level]">[menu_title]</a>}]', "</li>", '<ul class="ullev[level]">', "</ul>", true,
'<ul id="header_menu" class="menu">');
?><br style="clear:left;"/>
</div>
--- End code ---
disables the top level-link
jbs:
pieterb -- I was thinking of that and may end up doing that. But they would prefer if it just stayed where it is (similar to a "#" link would do on a hyperlink). If I can't find what they are looking for, I may do it that way.
DarkViper -- sorry, not following
Snoork -- they want some of the top menu items to work and not others, so I don't want to kill them all. But I'll keep this code for other uses; definitely useful in other cases.
Navigation
[0] Message Index
[#] Next page
Go to full version