My use case is this:

The main menu on my site has lots and lots of links, but in a given section of the site, I want some of the 3rd level links NOT to be shown in the fly-out. When in that section of the site, the 3rd level links show in the sidebar, as sub-navigation.

Because these links can't be "disabled" (since they need to show in the sidebar) It would be nice to be able to UnCheck the "Show as expanded" checkbox on the parent item, and have those children not appear in the nice-menu.

Comments

BrockBoland’s picture

By default, new menu items do NOT have the "Show as expanded" option checked. If this were implemented right now, Nice Menus would (probably?) stop working pretty much across the board.

We could add an option to the Nice Menu block configuration to choose whether or not to use the "Show as expanded" option should be considered when building sub-menus. I'm not sure if this would be over-complicating the Nice Menu block configuration form, but it's also a real use-case that needs to be addressed.

In any case, I'm going to write a patch to add this option to the block configure form, and jenlampton and others can review to see how it looks.

BrockBoland’s picture

StatusFileSize
new5.87 KB

This patch adds a new Respect "Show as expanded" option option on Nice Menu blocks, as seen here:
New option screenshot

I'm not sold on the help text below it though, I think this needs review more than anything else:

Menu items have a "Show as expanded" option, which is disabled by default. Since menu items do NOT have this option checked by default, you should choose Yes here once you have configured the menu items that you DO want to expand.

BrockBoland’s picture

Status: Active » Needs review
StatusFileSize
new62.25 KB

Whoops! As seen in the screenshot attached on this comment.

ykyuen’s picture

I applied this patch to 7.x-2.1 version but the nice menu still does not expand by default. i am using omega theme.

BrockBoland’s picture

@ykyuen: The selected items won't be expanded by default, they simply will NOT include child elements if the "Show as expanded" option isn't checked.

ykyuen’s picture

ic. thanks.

xiukun.zhou’s picture

Status: Needs review » Fixed

Thanks a lot to BrockBoland, jenlampton and everyone else for the great work on the patches, testing, reviews and reporting. This is a very good patch, but I did some simple modifications

It's more time this got committed and I went ahead and had this rolled at: 7.x-2.x: c247a99.

Marking this as fixed.

Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyne for the help and great work on this issue.

Cheers!

Status: Fixed » Closed (fixed)

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