Hi

Does superfish have a nolink function like the module special_menu_items ?.

Thanks for any help provided.

Regards
Fantomcat

Comments

mehrpadin’s picture

Hej Morten,

No, it does not, but you can use that module together with SF.

fantomcat’s picture

Hi mehrpadin

Sadly enough there is no Drupal 7 version of the special_menu_items module .

As it looks right now, there is no Drupal 7 modules at all that gives the possibility of a nolink function in SF.

Would be great if the SF module had this function.

Regards
Morten

jdvc’s picture

Hey Fantomcat,
Check the issue queue of special menu items, someone ported special menu items to drupal 7, and i beleive the code is either in the posting or on github. I'm using it with drupal 7 and superfish with no issues for nolink menu items.

Thanks, Joe

vdeparday’s picture

I have tried the last version available in this thread but it is not working for me. It links to a / page so I get a "Page not found" error. I am using default settings but maybe the special module items was updated and it got broken. I will try to find a fix or if anyone has one, feel free to post.

mehrpadin’s picture

Hey Vivien,

You should use the v1.8 as v1.9-beta2 is in fact v1.7.

vdeparday’s picture

I meant that I am using the last version of the special_menu_items module that is available in the thread mentioned by joetoday (http://drupal.org/node/1007054) but I am using the 1.8 version of the superfish module. I cannot manage to get a parent menu item with nolink. Is there an easy way to do that directly through superfish?

Thanks

skolesnyk’s picture

It's been reported in several threads here that Superfish isn't compatible with any of the modules that provide custom menu item link option.

mac_weber’s picture

There is no module for such feature compatible with SF.
Some issues are reported, no good solution yet:

Superfish not compatible with Void Menu - Forces link attributes.
http://drupal.org/node/1190688

Menu firstchild support
http://drupal.org/node/1126574

Peters196’s picture

Although Superfish does not have a nolink function, and because there does not appear to be a working nolink module compatible with Drupal 7 I have hit on a way to provide the same functionality which as well as being version independent should also work with other menu structures. (I am using it with the Superfish Menu in the Danland theme using Drupal 7.7)

Background. I wanted the parent item of a menu to do nothing to make it look and feel like a normal Windows menu bar.
An added complication was that I wanted one menu item to be visible only to authenticated users.

The basics
Create a basic page with the following PHP code in the body:

<?php
$location = "location: " . $_SERVER['HTTP_REFERER'];
header($location);
?>

$location returns the URL of the page wich loaded this page (i.e. the page that was displayed immediately prior to loading this one).
header($location) loads that page, taking you back to where you were.
Create a top-level menu item and give the URL as the node id of the basic page.
...and there you have it! Click on the top menu item and it stays on the same page as before the menu was clicked!

If you want a nolink menu which is only visible to specific roles of user it is slightly more complicated:
1. Create a block with exactly the same PHP code as above.
2. Create a Panel Page with a single column display. Add content: Custom Blocks -- [the block you just created]. In settings>Access select User:Role and choose the roles for which the menu should be visible
3. Create a top level menu item and set the url to the URL you gave to the panel.
... and there you have it - a menu which does nothing, and is invisible to unauthorized users!

rumblewand’s picture

I have had working for sometime in D7 with mega menu using the git version (which may have been removed now that there is a dev release) of special-menu-items and the code found in #1190688: Superfish not compatible with Void Menu - Forces link attributes..

A user there reports having successfully used nolink in superfish though it didn't work for me but it does work with mega-menu. A clue perhaps? Anyway good luck.

rumblewand’s picture

You know what. I just realized the reason it doesn't work for me is that I never made that change in #1190688: Superfish not compatible with Void Menu - Forces link attributes. to superfish. Just mega-menu so it probably works just fine!

phoenix’s picture

Is there a way to include some code to make the super fish module compatible with the special menu items module?
See issue over there: #1273602: Conflict with other module make nolink creates "/" & "Page not found"

They advise to change code in the super fish module. Is there a way to include it, to be able to use the contrib versions without making changes, for having a better maintainability?

Thanks!

peterx’s picture

StatusFileSize
new1.38 KB

Superfish 7.x-1.8 patch from http://drupal.org/node/1273602

patcon’s picture

stripped off windows prefix so works with drush make now

valante’s picture

Status: Active » Needs review

Please check the patch in #14.

valante’s picture

Category: support » bug
valante’s picture

Title: Does Superfish have a nolink function ? » Items marked as "nolink" are still converted to active links

Changing to bug report so that patch would be tested . . .

mehrpadin’s picture

Hey everyone,

I think v1.9-beta is what you need. :)

Edit: I meant v1.9-beta4 .

mherchel’s picture

Mehrpadin: Maybe I misunderstood, but I just tried v1.9-beta, and I'm having the same issue. I also cleared the cache, and re-saved the menu item.

mherchel’s picture

The patch in #13 works with me. Thanks and Happy New Year!

kingfisher64’s picture

Can #13 be put into the new release?

That would be useful for users who don't patch. :)

mrfelton’s picture

Patch against 7.x-1.9-beta4

mehrpadin’s picture

Ok, sorry for the trouble, the Drupal 6 version of the Special Menu Items works with Superfish - which is what I meant because I tested them for compatibility and so on a year ago or so - but the Drupal 7 version does not, I've had a look and found out the Special Menu Items module overrides the theme_menu_link, which interferes with other modules and so on, I've submitted a fixed version here: http://drupal.org/node/1447988

Tom, merci for the patch, and thank you all.

:)

Anonymous’s picture

I posted the fix I found to this issue on this page. http://drupal.org/node/1273602#comment-5640798 (see #43 posted by pixels72)

I now have Superfish menus with using special menu items module on the latest D7 working just fine. I hope this helps everyone here.

jeffschuler’s picture

Patch in #14 worked for me on 7.x-1.8.

mehrpadin’s picture

Status: Needs review » Closed (works as designed)

Jeff,

The patches are not recommended, please read the #23.

Also, I forgot to say thanks to the patch senders :) thanks Peter merci Patrick and Tom!