Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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!

share|improve this question

4 Answers 4

up vote 1 down vote accepted

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.

share|improve this answer
    
+1 I've seen that mod, but super hard to tell if it'll work with the system I have in place, or even worse create a conflict... guess I'll give it a try. Thanks! –  blunders Nov 5 '10 at 22:09
    
Yep, got some crazy error message "user warning: Duplicate entry"... :-) ...lucky it went away after I delete the mod. –  blunders Nov 5 '10 at 22:33
    
Hmmm, that makes me wonder which modules you have enabled. I never had incompatibility problems with special menu items. –  marcvangend Nov 6 '10 at 9:07
    
Re-problems with Special Menu Items, lots of people are having issues simply because you need to clear all caches after installing it for it to work! –  Dan Bolser Aug 14 at 9:57
Http://#

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.

share|improve this answer
    
This would be better as an edit to your question or a comment since it's not actually an answer. –  John Conde Nov 5 '10 at 18:44
    
@John Conde: I'm using it as an answer for now, meaning at the very least I'm able to create place holders, and move forward until I find a better answer. –  blunders Nov 5 '10 at 19:00

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 $('.menu-item-classorID').click(function(){ return false; });

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

share|improve this answer
    
+1 Thanks, interesting suggestion! –  blunders Jan 26 '12 at 5:19
    
One common was is to link like this: href="#". That does nothing. –  paulmorriss Jan 26 '12 at 14:17
$("#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 :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.