New feature for Menu module

341 views
Skip to first unread message

Denitz

unread,
Aug 4, 2012, 4:51:14 AM8/4/12
to joomla-...@googlegroups.com
I propose a new feature for mod_menu in Joomla! 3:

Currently the module shows menu items only related to current menu item, either of same level or children, i.e. we have a menu structure:
Item A
 - Subitem AA
 - Subitem AB
 - Subitem AC

Item B
 - Subitem BA
 - Subitem BB
 - Subitem BC


Loading Item A page the module can only display 3 variants:

Item A
 - Subitem AA
 - Subitem AB
 - Subitem AC

Item B
 - Subitem BA
 - Subitem BB
 - Subitem BC


or
Item A
 - Subitem AA
 - Subitem AB
 - Subitem AC

Item B

or
Item A
Item B

This restricts us from ability to display the list of items not related to current menu item, i.e. sometimes we need to display all children items of Item B, no matter which menu item is active now:
 - Subitem BA
 - Subitem BB
 - Subitem BC


Current module will never display list of these 3 items if i.e. we load -Subitem AC, because it filters all items by path of current item.


But we can add a new module setting 'Root item' - drop-down list with all menu items + 'Active item' as first option selected by default + 'Menu item root' option
In this case we setup 'Item B' as 'Root item' and 2 for start and end levels settings.
Now our module will always display subitems of Item B, now matter which menu item is currently loaded.

Full backwards compatibility is presented because 'Active item' is used as default and is equal to current behavior of mod_menu.
And we get the nice feature to display specific menu items despite of page currently loaded by user.

I would like to hear your opinions and can propose a simple patch for mod_menu, this feature requires really small and simple changes in modMenuHelper::getList().

elin

unread,
Aug 4, 2012, 10:53:46 AM8/4/12
to joomla-...@googlegroups.com
How does this differ from setting the submenu items to show at some level of depth? In the testing data for the Using Joomla menu I added a link under the Getting Started link.  Then in the "A deep menu" module I changed the options to show the sub menu items starting at 1 and ending at 3.   At that point if I click on my new child I still have the submenu items displayed.

I think the most important thing is that the ability to do split menus is completely preserved. That is an absolute key feature and makes it possible to control your urls using the menus while not having to show the full hierarchy.
So in other words you absolutely must be able to click on Item A and only show AA,AB,AC (without A).



Elin

Denitz

unread,
Aug 6, 2012, 1:40:47 AM8/6/12
to joomla-...@googlegroups.com
Elin, the problem is that module filters items depending on current menu item.
You can't render the list of 3 only items if visiting "Item A":
Subitem BA
Subitem BB
Subitem BC

In other words I want to add a static behavior to mod_menu, so we can display fixed list of configured items, no matter which menu item is currently loaded.


elin

unread,
Aug 6, 2012, 8:05:18 AM8/6/12
to joomla-...@googlegroups.com
Do you mean just the subitems of B but not B itself? Because I have not problem getting
A
 AA
 AB
 AC
B
 BA
BB
BC

When clicking on either A or  AB.

Elin

Denitz

unread,
Aug 6, 2012, 8:54:02 AM8/6/12
to joomla-...@googlegroups.com
Yes, just subtitems.
And i.e. we can't display these subitems only if visiting a menu item from other menu

elin

unread,
Aug 6, 2012, 6:19:47 PM8/6/12
to joomla-...@googlegroups.com
For me starting with anything other than level 1 seems to be broken.

Elin 

Denitz

unread,
Aug 16, 2012, 3:29:09 AM8/16/12
to joomla-...@googlegroups.com
So can we add this feature or not?


Joe Palmer

unread,
Aug 16, 2012, 5:30:57 AM8/16/12
to joomla-...@googlegroups.com

I have wanted to do this in Joomla for years, this would be an awesome feature! Many times I have needed to show just the submenu items of a different parent to the active one and currently the only way I have found to achieve this is to create another menu of aliases which really feels like a workaround. This simple change would make the menu module so much more flexible whilst preserving backwards compatibility and all current functionality!

I would strongly vote for this feature and would love to help test it.

+10

On Aug 16, 2012 8:29 AM, "Denitz" <sirdi...@gmail.com> wrote:
So can we add this feature or not?


--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/RCncdhf2aZ4J.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.

Denitz

unread,
Aug 16, 2012, 5:34:45 AM8/16/12
to joomla-...@googlegroups.com
Exactly! I also tired of creating tons of aliases!
I can create a patch easily, but somebody needs to lobby this feature.


Nick Savov

unread,
Aug 16, 2012, 9:47:05 AM8/16/12
to joomla-...@googlegroups.com
Create the patch, submit it, create nice detailed step-by-step testing
instructions, and you can count me in as another tester.

Kind regards,
Nick

> Exactly! I also tired of creating tons of aliases!
> I can create a patch easily, but somebody needs to lobby this feature.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-cms/-/xdrmJ53i57IJ.

Joe Palmer

unread,
Aug 17, 2012, 9:56:36 AM8/17/12
to joomla-...@googlegroups.com
I will raise awareness of this great potential feature.

It is Joomla London this comming Tuesday where we plan to go through alpha 2 in detail. Showing our members how to apply and test a patch would make a great talk. If we could use this feature as the example, it would definitely gain extra support...

Phil

unread,
Aug 17, 2012, 12:20:24 PM8/17/12
to joomla-...@googlegroups.com
I agree, this is a great feature. Its happened to me on several occasions where I want to show the children of the submenu above or below where I am but not the active one only.
I would be up for testing as well. More the merrier.

elin

unread,
Aug 18, 2012, 8:35:54 PM8/18/12
to joomla-...@googlegroups.com
Would someone want to take on fixing the current bug that prevents showing any menu starting after level 1? I don't think we can do anything much if we don't get that taken care of.

Elin

Michael Babker

unread,
Aug 18, 2012, 8:40:34 PM8/18/12
to joomla-...@googlegroups.com
Are you talking about the menus in the current master with the Bootstrap markup?  If so, this is actually a limitation in Bootstrap 2.0 which is fixed in 2.1, due for a Monday release, so it should be fixed in master soon after the work is done to update us to Bootstrap 2.1.

If that's not what you're referring to, then ignore my babbling ;-)

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/GIFM44eOkRwJ.

elin

unread,
Aug 18, 2012, 8:59:03 PM8/18/12
to joomla-...@googlegroups.com
No it's a bug that has been in trunk for a while that I posted about earlier in this thread (before the merge). Try taking any menu with parent and child items  and displaying it starting with level 2. 

Elin

Josip Posavec

unread,
Aug 19, 2012, 1:38:39 AM8/19/12
to joomla-...@googlegroups.com

I think Elin was writing about hat issue.  And  yeah I can confirm the problem and solution which is implemented in Bootstrap 2.1.

 

Josip Posavec

Lead Project Manager

Sfera IT

E-Mail: jo...@crowebs.net

elin

unread,
Aug 20, 2012, 3:34:54 AM8/20/12
to joomla-...@googlegroups.com
No that's not the issue I was writing about, but I thnk this may be the cause

Elin

elin

unread,
Aug 22, 2012, 6:07:47 PM8/22/12
to joomla-...@googlegroups.com
I posted a pull request for this which I would appreciate people testing.

Elin

Denitz

unread,
Sep 18, 2012, 6:51:29 AM9/18/12
to joomla-...@googlegroups.com

Roberto Segura

unread,
Sep 18, 2012, 6:57:18 PM9/18/12
to joomla-...@googlegroups.com
Tested.

El martes, 18 de septiembre de 2012 12:51:29 UTC+2, Denitz escribió:


Joe Palmer

unread,
Sep 19, 2012, 10:58:53 AM9/19/12
to joomla-...@googlegroups.com
I have tested as well, another great feature patch Denitz (nice to see Guest is now enable by default)!

Can the status now be changed?...

Denitz

unread,
Sep 19, 2012, 11:27:39 AM9/19/12
to joomla-...@googlegroups.com
Now we need to persuade bosses to commit this patch to 3.0 without waiting for 3.1

Joe Palmer

unread,
Sep 19, 2012, 11:47:17 AM9/19/12
to joomla-...@googlegroups.com
Totally!

This is such a simple but important feature which maintains complete
backwards compatibility, it would be a great loss is it wasn't in
v3.0.

Who do I need to persuade? I'm happy to try.

I can change the status on the tracker item. Do you think it needs to
be changed to Ready for review or maybe Pending? Don't want it to slip
under the radar.
Reply all
Reply to author
Forward
0 new messages