Mobile app version of vmapp.org
Login or Join
Shelton105

: How do you create links with a NULL or # in Drupal? Trying to create folders for links where the parent has no content, it's just a folder. Need to be able to insert #, but Drupal is saying

@Shelton105

Posted in: #Drupal

Trying to create folders for links where the parent has no content, it's just a folder. Need to be able to insert #, but Drupal is saying it's not a link. Just want the user to click it and nothing happen, the child of that menu item will already be being displayed without a click.

Version: Drupal 6 (appears worked in D5)

I've attempted the following: '', #, <#>, empty, <empty>, null, <null>, blank, <blank>, <none>, none, <answer> ...just kidding.

ERROR: The path '<insert_non-url>' is either invalid or you do not have access to it.

Question, just ask -- thanks!

10.04% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelton105

4 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

$("#block-menu_block-1 li.expanded > a").removeAttr("href");


I use this to get rid of href of the first level of li a.
This makes it possible to use the first a links in a menu as non click able categories.
This is a bit ugly but it works for smaller things :)

10% popularity Vote Up Vote Down


 

@Speyer207

You could just make a bogus link to anything, perhaps the homepage and then use jQuery to turn off the click by adding something like this:

$('.menu-item-classorID').click(function(){ return false; });

Quick and dirty method but does the trick in a pinch. Use menu attributes module to add class or ID to a menu item.

10% popularity Vote Up Vote Down


 

@Twilah146

I always use the Special Menu Items module, which allows you to enter "nolink" as path. A 'nolink' menu item will render as a normal menu item without <a> tag, but you can style it differently if needed.

10% popularity Vote Up Vote Down


 

@Shelton105

#

Drupal takes it as input, but it returns an error in the navigation, but at least I've got a menu item. Posting this for now until someone post an answer that Drupal 6 takes as input, and does not produce an error.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme