? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
30 Dec 2015

Description

This PR adds the ability to exclude menu items from displaying in frontend in mod_menu.

Simple use case:
We have a menu where we have 5 items: Home; The company; Services; Portfolio; Contacts
But we don't want to show "Home" in the main menu, just: The company; Services; Portfolio; Contacts.

This PR will also allow to create "hidden" menu items that exist in the menu and the website but aren't displayed in the main menu without having to create another menu for those "hidden" menu items.

How to test

  1. Fresh Joomla install with multilanguage.
  2. Apply this patch
  3. Go to the main menu module and use the new field "Exclude Menu Items" to exclude some menu items from displaying in the frontend menu.
  4. Check in the frontend it those items are not displayed in the main menu.

Observations

Suggestions are welcome.

avatar andrepereiradasilva andrepereiradasilva - open - 30 Dec 2015
avatar andrepereiradasilva andrepereiradasilva - change - 30 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Dec 2015
Labels Added: ? ?
avatar andrepereiradasilva andrepereiradasilva - change - 30 Dec 2015
Title
mod_menu: Allowing to exclude menu items from displaying in frontend
mod_menu: Allowing to exclude menu items from displaying in frontend menus
avatar Bakual
Bakual - comment - 30 Dec 2015

Personal opinion: This would be a parameter which solves something that is already possible with the current menu modules. Just put those menu items into a menu that isn't attached to a menu module (hidden menu).

avatar brianteeman
brianteeman - comment - 30 Dec 2015

There are definite advantages to being able to "hide" individual menu items within the structure of an existing menu. It is not the same as having a specific menu for hiding all menu items.

I regularly have to do this either with CSS or an existing extension. It would be great to have this in the core.

avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Dec 2015

@Bakual yes i know the hidden menu trick.

But if you try to that with the "Home page" menu item it gets complicated (you have to create multiple menus with menu items reference others). If you try to that in multilanguage menus is even more complex.

Another thing is, how do you hide, for instance, a level 2 (or deeper) menu item of the main menu with an hidden menu?

As @brianteeman i have the same problem in many sites.

avatar brianteeman
brianteeman - comment - 30 Dec 2015

Would it not make more sense from a usability perspective to set the exclusion in the menu item and not the module. This method is no different to existing alternative menu modules.

avatar justinherrin
justinherrin - comment - 30 Dec 2015

I vote that having a toggle yes/no switch in the menu item edit screen would make the most sense for usability and overall workflow.

avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Dec 2015

The only "problem" i see with that is less flexibility.

If the exclusion option is in the module you can have different modules (applied to different pages) showing the same menu with different levels and/or exclusions (like topmenu and sidemenu).

If the exclusion option is in the menu item you can't do that. The exclusion of the menu item is for all menu modules that call that menu.

But in my case i have no problem with that. Don't know if anyone would really need that flexibility.

avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Dec 2015

@brianteeman i know that are a lot of extensions for menus.

I will check putting that option in the menu item itself.

avatar andrepereiradasilva
andrepereiradasilva - comment - 30 Dec 2015

@brianteeman @justinherrin closed this because opened #8816 with the same behaviout but now with menu item option.

avatar andrepereiradasilva andrepereiradasilva - change - 30 Dec 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-12-30 21:20:02
Closed_By andrepereiradasilva
avatar andrepereiradasilva andrepereiradasilva - close - 30 Dec 2015
avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 30 Dec 2015
avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Jan 2016

Regarding #8814. I see this one has also great usability. Assume some case when we want to render same menu and show different set of menu items in different menu module positions!
With that we could override/inherit the selections at will.

@izharaazmi i agree with you. that's why in my first PR (this one) i use the module and not the menu item.
But i also agree with @brianteeman @justinherrin since i can see the use for both options.
I will not do more PR regarding this matter (i have other PR to do), but you are free to do it. And use this code if you want.

Add a Comment

Login with GitHub to post a comment