Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Menu items with such paths as my-page#tab3
get stripped out to just my-page
The ability exists in core menus.
Note: such items must be entered as node/555#tab3
Comment | File | Size | Author |
---|---|---|---|
#2 | megamenu-item-options-1597628-1.patch | 1.71 KB | doublejosh |
Comments
Comment #0.0
doublejosh CreditAttribution: doublejosh commentedadd note.
Comment #1
doublejosh CreditAttribution: doublejosh commentedSeems I can't get to it from theme_menu_link()
Comment #2
doublejosh CreditAttribution: doublejosh commentedThere are plenty of lines in this module with no regard for attributes beyond href.
EXAMPLE LINE 223
'data'=>l($leaf['link']['link_title'], $leaf['link']['href'], $leaf['link']['options']),
By carrying in the options, I'm sure there are other features that will get taken advantage of too.
This is an easy win.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you for the patch. This issue is related to:
#1463820: Adding title attribute to link
#1195348: megamenu omits link parameters
#1205068: Refactored theme_megamenu_menu_tree(), multiple fixes.
Comment #4
greggmarshallPatch from #2 resolved the problem we were having using HTML bookmarks (aka in page links, fragments, hash links) not being rendered in our megamenus.
Thanks @doublejosh.
Comment #4.0
greggmarshallnote.
Comment #5
ram4nd CreditAttribution: ram4nd at Wunder commentedSeems that this is already in the code.