due to this issue #865892: Menu items that are not links there has been a patch applied to the megamenu that fixes "nolink" issue but does not handle it properly
why not properly ?
the way nolink is handled now is just a very plain vanilla functionality with no compatibility for other modules such as menu_attributes which according to the maintainer is a major feature (http://drupal.org/node/799280#comment-4444674)to be added
just deleting the "nolink" extra handling code
if ($leaf['link']['router_path'] == 'nolink') {
$link_data = '<span class="nolink">' . $leaf['link']['link_title'] . '</span>';
}
else {
$link_data = l($leaf['link']['link_title'], $leaf['link']['href'], $leaf_link_options);
}
making this
$link_data = l($leaf['link']['link_title'], $leaf['link']['href'], $leaf_link_options);
and installing the http://drupal.org/project/special_menu_items and we still get the "nolink" functionality and together with the patch provided on #799280: Ability to inject custom css classes into each level of the menu - menu attributes compatibility all other attributes should be carried over to the menu items
I can provide a patch after maintainers approval and/or commiting of the above issue
Comment | File | Size | Author |
---|---|---|---|
#9 | 0001-fix-1170472-use-theme_menu_link-to-render-menu-links_drush-make.patch | 5.82 KB | patcon |
#8 | 1170472-use-theme_megamenu-render-menu-links.patch | 5.97 KB | Anonymous (not verified) |
#5 | 0001-fix-1170472-use-theme_menu_link-to-render-menu-links.patch | 6.19 KB | geek-merlin |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedDid you provide the patch for this in #799280: Ability to inject custom css classes into each level of the menu - menu attributes compatibility?
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedFor some reason, special menu items didn't work before I added the if case for it... But if it works now without it, then I like this approach.
Comment #3
GiorgosKif you ask me all nolink custom code should be dropped if possible
Comment #4
geek-merlinsub.
i'm running a patch here which solves the issue (and #1078694: Mega menu doesn't allow query strings in menu paths) by calling theme_meju_link.
i'll run sume tests and then post it.
Comment #5
geek-merlinthis patch works fine on our 7.x sites.
it uses theme_menu_link to render links so has good chances to play fine with *any* module that hooks in there.
it really hurted to work around the current api "flaw" that theme_menu_link wraps the a tag in a li element, and that the current js needs "h2" and "h3" elements around the a tag.
for me it's a lolution-for-now until the rewrite.
what we get for free with this patch is a fix for #1078694: Mega menu doesn't allow query strings in menu paths
Comment #6
wizian CreditAttribution: wizian commentedThis patch works nicely for me (D7.2) using the nolink tag. Thanks a lot Axel.
Comment #7
alexbk66- CreditAttribution: alexbk66- commentedSee #1205068: Refactored theme_megamenu_menu_tree(), multiple fixes.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedRerolled patch to work against 7.x-1.x-dev with drush make
Comment #9
patcon CreditAttribution: patcon commentedRerolled patch in #5 against current HEAD (commit hash 2b1f274) so that it will work with drush_make. This replaces the patch in the message immedaitely previous :)
Comment #10
mherchel#9 failed to patch, giving the error:
fatal: git diff header lacks filename information when removing 1 leading pathname component (line 5)
#8 did apply the patch, but gave some trailing whitespace messages. It did fix the problem, though :)