How to show a menu item (menu component) as Active, even if we are in its child menu

Hello, my App has a couple of Menu items in the main page,
one of them is "Users".

Once there, you see a list of users, which can be clicked, and then you will be redirected to a "User details" page of the selected user.

Now in my Menu Component, it highlights the current Menu we are on.

So if I'm in "Users", then the menu "Users" will be highlighted, but if I go in a User's Details page, then my top menu has no items highlighted.
I understand this, as I'm not in "Users" page anymore, but what can I do, that if you navigate to children menu (so User details for example), it leaves the highlight on the Parent menu (Users in this case)

Is there a way?

1 Like

This happens automatically in our CRM demo - the Settings item is open when the Task Types page is loaded.

@korchev thank you for the answer.

In your example, "settings" isn't a page, but just a container for the other submenu, right?

In my example, here a picture:

as you can see, in the upper part of the picture, i'm in the "Users" page, and correctly the menu is highlighted, and on the Right side, you can see how the "menu component is set up".

Now while in the "Users" page, I can click on a User, and I will be redirected on the "/user_details" page of that user (bottom-right image, this is how I navigate there).

Once in the User_details, the menu is not highlighted anymore (bottom-left picture).

How can I make it that radzen knows that "user_details" pages are all children on "users" page and they should highlight "User" in the main menu?

You can't. A menu item that is a page itself shouldn't have children IMHO.

1 Like