When you use link_path on line 183, 186 and 207 to build the links changes by other modules are not being utilized since they all alter the href element in the menu array. Please update to use href so that changes made by modules such as menu_firstchild stick.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | megamenu-897424.patch | 10.71 KB | ryanwebpage |
| #12 | megamenu-897424.patch | 12.65 KB | ryanwebpage |
| #9 | megamenu-897424.patch | 7.79 KB | electblake |
| #10 | megamenu-897424.patch | 9.12 KB | electblake |
Comments
Comment #1
Anonymous (not verified) commentedHow do I use href? When I look at the menutree object, I don't see it in there.
Comment #2
ryanwebpage commentedhref is returned in the array from the menu_tree_all_data call. After a few attempts I realized that both the menu_tree_page_data and menu_tree_all_data needed to be utilized to get the result we were after. We were losing the active trail. For some reason the menu_tree_all_data does not have the active trail set properly. We came with a solution if you are interested?
Comment #3
Anonymous (not verified) commentedI'm definitely interested :-)
Comment #4
Anonymous (not verified) commentedComment #5
ryanwebpage commentedWe modified _megamenu_get_menu_tree to return more data with the following changes
We also updated your megamenu theme function to utilize drupals themable item list
I believe my partner in crime electblake reached out to you already about being co-maintainers. Are you interested?
Comment #6
Anonymous (not verified) commentedYeah, have electblake submit this change as a patch in his co-maintainer request post.
Comment #7
Anonymous (not verified) commentedActually, post the patch in this thread and then point to it from the co-maintainer request.
Comment #8
erykmynn commentedI like this! Once we have a patch, we will put through the co-maintainer request!
Comment #9
electblake commentedEDIT: SORRY - I FORGOT AN ADDITIONAL FUNCTION I CREATED FOR THE LIST_ITEM UPDATE. _megamenu_active_classes RE-DIFFING SEE BELOW PATCH in COMMENT #10
As per Jepedo's note above - I created a patch for our updates. Please review and let us know.
Please note that we had (unknowningly) worked - http://drupal.org/node/800308 - into our code and our version will probably require updates to sync with that patch (sorry!)
Comment #10
electblake commentedSorry about that - it's been a couple of week since we last created these updates, forgot all that was required.
New Patch Attached.
Comment #11
lobo235 commentedI just installed the patch from #10 without any errors during the patch process but now the module no longer works so I had to back it out. Here is the PHP error encountered after the patch:
Comment #12
ryanwebpage commentedSorry about that. There was a duplicate function that ended up getting copied by mistake.
New patch attached
*** Edit ***
Sorry patch is incorrect. It was patched from the previous patch and not from the current version. I will upload a new patch
Comment #13
ryanwebpage commentedThis should do it.
Comment #14
Anonymous (not verified) commentedI just got around to testing this patch and it looks like things have changed a bit since the patch was generated. megamenu.utilities.inc patches cleanly, but megamenu.module fails at #169.
I think the addition of the CSS custom path pushed the code down a few lines, which is why this patch fails.
Comment #15
kansaj commentedHI it's working really nice, I would like to propose just to set additional class for items, which don't have submenu.
Comment #16
Fanaile commentedHi;
I tried to apply the patch at #13; but I wasn't able to run update.php - it just kept bringing me to a blank screen. When I reverted back I could run update.php again.
Comment #17
Anonymous (not verified) commentedComment #18
Anonymous (not verified) commentedCommited change to use href instead of link_path to 6.x-2.x-dev in #488966