We have moved to Github. Please open tickets there.

Opened 2 years ago

Last modified 13 months ago

#3594 new Defect

new menu system does not support more than one selected item

Reported by: vazco Owned by:
Priority: normal Milestone: Near Term Future Release
Component: Core Version: 1.8 Beta
Severity: minor Keywords:
Cc: brett@… Difficulty:

Description (last modified by ewinslow)

Currently when we have following menu structure:

parent [link1]

  • child1 [link2]
  • child2 [link3]
  • child3 [link1]

if we go to link1, parent will be marked as selected (although child3 has the same link, it won't be selected). I think both links should be marked as selected instead.

Change History (4)

comment:1 Changed 23 months ago by cash

  • Summary changed from 'selected' elements in menu to new menu system does not support more than one selected item

Need input on this: should the menu system support multiple select items (whether in a tree as described by Vazco or in a single section)?

Right now the menu builder only marks the first menu item it comes across that matches the requested URL as the selected item. The biggest change would be to the ElggMenuBuilder::getSelected() method. It would return an array rather than a single menu item.

comment:2 Changed 23 months ago by ewinslow

I don't think we need to support multiple selected items, but I can see that in Vazco's case, it's definitely more intuitive for the child link to be selected, so we just need to be a bit smarter when finding the selected item.

comment:3 Changed 21 months ago by cash

The issue is that we are finding the selected item before creating the tree. It is much easier to scan a list than crawl a tree. If we did it with the tree, we would keep track of depth and the deepest menu item would be selected. CSS could then be used to do the rest.

comment:4 Changed 13 months ago by ewinslow

  • Description modified (diff)
  • Milestone changed from Needs Review to Near Term Future Release
Note: See TracTickets for help on using tickets.