Closed (duplicate)
Project:
Superfish Dropdown Menu
Version:
7.x-1.8
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2011 at 22:02 UTC
Updated:
23 Nov 2012 at 15:20 UTC
I seem to have difficulties to make Menu firstchild and Superfish work together.
I have a very simple Main menu that is as follows :
-Home
-Workshop
--Presentation
--Styles
-Contact
When I display the menu block normally, everything works fine and the item "Workshop" actually points to the first-child element, "Presentation".
But when I try to use this menu with Superfish, the link becomes "example.com/"
Thanks in advance for your help.
Comments
Comment #1
jon betts commentedPart of the original message from the post above is missing due to code stripping. What it should say is:
But when I try to use this menu with Superfish, the link becomes "example.com/
<firstchild>"It would be great if this module either supported the firstchild module or included the feature natively.
Comment #2
bryancasler commentedsubscribe
Comment #3
Jiri Volf commentedsubscribing
Comment #4
Poieo commentedConfirm the same issue. Subscribing.
Comment #5
striknin commentedSubscribing ! Same issue for me too.
Comment #6
Lithops commentedHi,
Same issue here, really nobody?
Comment #7
jasondecamp commentedsubscribing
Comment #8
sboots commentedSubscribing! Same issue.
Comment #9
Fonkel commentedWould be great to have an option for a false return on click for parent menu-items. I prefer this over using menu-firstchild
Comment #10
omercioglu commentedPerhaps it can support "" (
, , ... whatever) natively.
Comment #11
omercioglu commentedSorry, posting again;
Perhaps it can support
"<none>" (<parent>,<firstchild>,<separator>, ... whatever)natively.Comment #12
omercioglu commentedI've found http://drupal.org/project/void_menu which does what i suggested.
Related issue : #1190688: Superfish not compatible with Void Menu - Forces link attributes.
Comment #13
sboots commentedHey everyone! Here's a small fix to get working with Superfish menus. It should still work even if menu_firstchild is disabled, but i haven't checked yet. Feedback welcome. : )
In superfish.module, line 1012 is:
Immediately above that line, paste in:
That calls menu_firstchild's internal function to find the child link URL to use, and then the l() function on the line below takes care of finding aliases/etc. which is pretty cool. : ) Drupal... Powerful but confusing!
(And, a hat tip to the Devel module and its dsm() function, which came in super handy while trying to figure this out!)
Have an awesome day!
Comment #14
Poieo commented@sboots - Works for me. Not sure if there are negative effects. Thanks a ton!
Comment #15
mac_weber commentedI don't think #13 is the best approach, is it cares about a specific module. Actually void_menu also has this issue.
This thread should be marked as duplicate:
#1190688: Superfish not compatible with Void Menu - Forces link attributes.
Comment #16
inky@inky3d.com commentedI don't suppose you could include a patch for the 6.x-1.8 version of Superfish?
I'm having the same issue there :/
Comment #17
mehrpadin commentedHere's a quick fix: superfish.module (D7) , line #1012 :
Change it to:
To Floris: There's actually already such a thing, it's called as sf-Touchscreen (Block configuration, under Plugins); The first click on a parent item returns false - and shows the sub-menu as a result - and the second click on the same parent item will be considered a normal click.
To Sean: Not recommended, but thank you and I truly and honestly appreciate it!
To Ingrid: Are you talking about the Void menu? because as far as I see 6.x-1.8 works with the Menu Firstchild.
Thanks everyone! :)
Update: Fixed as of v1.9-beta3.
Comment #18
anavarreThe solution provided in #17 worked fine for me.
Comment #19
mehrpadin commentedBonjour Aurelien,
Just upgrade to v1.9-beta4 :)
Comment #20
dieppon commented#17 works like magic, thanks
Comment #21
nicolas bouteille commented+1