Menu highlight

1
We are having some issues with a customer who would like to have more clarity about his whereabouts in our application. One of points we think would increase this is having our navigation menu light up after it has been clicked. Kinda like the forum where currently the tab Ask a question is highlighted. Is this also possible in Mendix and does anyone already have some experience with this?
asked
3 answers
2

This is currently not possible (2.5.2). Adding a class to the last clicked menu item would be the trivial solution, but there are several other cases to consider.

  • Classes would also have to be added to sub-menu items. The class names would have to be different to take into account their respective levels of nesting.
  • The navigation tree would also have to support this.
  • Classes would have to be removed if a navigation event was triggered without using the menu (the open_form in a microflow would be a good example).
  • Classes would also have to be removed if a navigation event was triggered from a different navigation widget (nav tree v/s menu, menu v/s nav tree or a combination with possible future navigation custom widgets).
  • History management is probably one of the trickier cases - going back a page in history would mean removing classes again but they would have to be reset on a history-forward event.

Future developments might add other variations in navigation possibilities and these also have to be taken into account.

To sum it up, this is one of those changes that seems trivial at first but hits a lot of use-cases and working through them all properly is decidedly non-trivial.

I'd suggest adding a feature request in MXDN for this.

answered
1

In addition to this i've an example:

Toplevelitem:

  • Submenuitem
  • Submenuitem

We want to highlight the parent of the child menu item and at least the submenuitem. We're already using the titlepath as breadcumbs, but highlighting the menu items is really a requirement. Any ways to fix this? I couldn't find a specific css-class for this behavior.

answered
0

Can you not enable breadcrumbs - I have done it for my theme works like a treat

answered