Just looking at 2.0-beta2 and all is fine (for me) expect that it is displaying disabled menu items.

Would be great if there is a quick fix for this, as just added the code to add a 'branched' class to items with branches.

CommentFileSizeAuthor
#5 showing_disabled menu_items.patch591 bytessravanglitter

Comments

SophieG’s picture

+1

kevinquillen’s picture

Looks like its because _megamenu_get_menu_tree is using menu_tree_all_data to build the menu which returns an entire menu tree, and the loop after it is not effectively removing it from the array if hidden == 1, especially root level parent items.

vamu’s picture

This is due to a spelling error on line 58 in megamenu.utilities.inc
Should be

if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier_1_key]);
}

code-brighton’s picture

value and key variable names are incorrect, edit the following lines in megamenu.utilities function _megamenu_get_menu_tree

change:
if ($tier1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier1_key]);
}

to:
if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier_1_key]);
}

sravanglitter’s picture

Status: Active » Needs review
StatusFileSize
new591 bytes

I have tested the above comment #4 and its working well for me. Here is an attached patch file for the solution given in comment #4 above and the version is 6.x-2.x.

jim kirkpatrick’s picture

Status: Needs review » Reviewed & tested by the community

Works for me...

Anonymous’s picture

Status: Reviewed & tested by the community » Fixed

Thanks code-brighton and sravanglitter. Commited to 6.x-2.x in 399e0b7

HippoOnDiet’s picture

I tried to install MegaMenu 6.2.x dev and got an error message about line 62:
Parse error: syntax error, unexpected T_ELSE sites/all/modules/megamenu/megamenu.utilities.inc on line 62

Checked on megamenu.utilities.inc and found the issue on line 61.

58. if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
59. unset($menutree[$tier_1_key]);
60. }
61. } //Delete this, too much close bracket
62. else {
63. if ($tier_1_item['below']) {

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.