WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: Akarin on July 16, 2009, 06:36:48 PM

Title: Silly Simple Menu Question
Post by: Akarin on July 16, 2009, 06:36:48 PM
I don't know if it matters, but I am using showmenu2.

How do you create a non-clickable placeholder for a menu?  In Joomla this is called a Seperator menu item.

For instance, I have a top level menu item called "Contact Us" with two sub menus "Directory" and "Directions".  The problem is that I don't want users to click "Contact Us" and be taken to a page (currently blank) but I still need it to produce the layer with the sub menu items.

Thanks in advance.

Akarin
Title: Re: Silly Simple Menu Question
Post by: Stefek on July 16, 2009, 06:45:22 PM
You will need a workaround for this.
There is no such function in WebsiteBaker.

Regards,
Stefek
Title: Re: Silly Simple Menu Question
Post by: Akarin on July 16, 2009, 07:33:05 PM
Thanks for the info.  I'll write something and release it :)
Title: Re: Silly Simple Menu Question [SOLUTION]
Post by: Akarin on July 16, 2009, 08:31:17 PM
Actually if anyone wants a non-code workaround to this, then here is a clunky solution.

Just create a new Page Type of Menu Link. 
Set the Link parameter to External Link and set the url to the web root /
Make this the parent of your other pages

That's it  :-D

Title: Re: Silly Simple Menu Question [SOLUTION]
Post by: Argos on July 16, 2009, 11:24:55 PM
Actually if anyone wants a non-code workaround to this, then here is a clunky solution.

Just create a new Page Type of Menu Link. 
Set the Link parameter to External Link and set the url to the web root /
Make this the parent of your other pages

I'm not sure if I understand you, but are you sending people to the homepage when they click on Contact now? You'd better send them to the first child instead, don't you think?

You can also split the menu in a header-type menu call with a link, and the real menu call. Like so (example from a client site: www.ksi-advies.nl):
Code: [Select]
// show the parent as non-linked header
show_menu2(1, SM2_ROOT, SM2_MAX, SM2_CRUMB|SM2_CURRTREE,'<h2>[menu_title]</h2>','','','',false,false);
// then show the menu
show_menu2(1,SM2_ROOT+1,SM2_CURR+1,SM2_TRIM|SM2_CURRTREE,'[li]<div class="bg_menu">[a][menu_title]</a></div>','</li>','[ul]','</ul>',false,false);
Clicking on the top menu generates the left menu automatically.

I'm sure you can also do some fancy showmenu2 coding with if-then constructions. See http://code.jellycan.com/show_menu2/