By LIQUID VISUAL on
Is it possible to create a menu item that is not clickable (does not have a path), under which there would be normal sub-items that are clickable (do have paths)?
Is it possible to create a menu item that is not clickable (does not have a path), under which there would be normal sub-items that are clickable (do have paths)?
Comments
Any solution
I'm new to Drupal , coming from Joomla world where this is quite simple. Did you ever get a solution to this query?
This is a way for 4.6. I
This is a way for 4.6.
I needed a way to achive this behavior with an old project of mine made on drupal 4.6. The only way I found, without patching the core, is overriding the proper theme function, in menu.inc, that renders the link. In 4.6 this function is theme_menu_item_link($item, $link_item). Use this function in your theme to include a conditional to avoid the l() function for the path you don't need the link. In my case, with a phptemplate theme, I used this:
Thus, the parent menu item with path 'hotels/languages' will render only as its title, no link, although it would have any children items you need. The only problem is that you would need to know beforehand the path of the item you don't want to be clickable. Otherwise, it will do the job.
---
Robert Garrigos
Professional site: robert.garrigos.cat
Catalan Drupal Users Group: drupal.cat
Way for drupal 5?
Any idea how to do it in drupal 5?
Any update?
Hi there, I'm also looking for a way to create placeholder/container/no-path menu items in Drupal 5.3. Any leads would be much appreciated. Thank you.
[Edit]: I'm finally settled with the solution from drupal.org/node/128618.
D5
This does the trick. Put in template.php
i'm now looking for d6
D6 solution here
D6 solution here
Is it possible to have some
Is it possible to have some menu items with sub-items to be clickable, while other menu items with sub-items are not? I am working on a site where this would be ideal.
Also, the PHP code for D5 template.php file didn't work for me. Has anyone else gotten it working?
Thanks.
Nathan
Drupal special menu items
Drupal special menu items Module does just that.
http://drupal.org/project/special_menu_items
Perfect Solution
Hi,
put the below line in path & put your desire title
http://#
Thanks,
Amit Garg
http://highpixel.in
Thanks
Thanks to all, esp Amit.
Check out the Mooney's Bay Webcam, at http://liquidvisual.ca
This actually throws an error
This actually throws an error on a few versions of Firefox (when you click on the menu item, an alert box pops up saying "The URL is not valid and cannot be loaded.").
This actually throws an error
(as said a little earlier) This actually throws an error on a few versions of Firefox (when you click on the menu item, an alert box pops up saying "The URL is not valid and cannot be loaded.").
JS Fix
I have a tiny piece of jQuery running to fix this:
Each menu item has a unique class, in this case menu-2598. The
>is important so as not to allow the child a elements to be affected.I am doing the same thing but
I am doing the same thing but it does not work well in terms of SEO or users/bots with Javascript disabled. Still searching for a sound, non-hacky solution. people can still access the placeholder item by typing it in the browser location bar.
I would gladly write a module that detects if the current menu items has children, and if it does, simply render a ul element containing the navigation. But I am at best a novice module author. Drupal 8 will probably be out before I solve this, and hopefully it will provide a solution.
Thank you.
Thank you very much amitgarg
Make it into 8.x core?
Issue:
#1543750: Allow menu items without path