Hello,
I am trying to figure out how to make a menu show as active if I am on a details page. Example:
Users Main Menu
- Create New User - /users/create
- View All Users -/users/index
the above is in config/global/menu.php
So if I select a specific user and end up at /users/show/155
The users menu collapses as there is not a menu item for show, but is there a way to make the Users Main Menu stay open and highlight View All Users?
Hi,
In the latest Metronic Laravel Starterkit v8.2.0, the file config/global/menu.php is no longer present. It's important to note that you might be using a legacy version of Metronic Laravel.
If you have access to our GitHub, the config folder does no longer have this folder;
https://github.com/KeenthemesHub/Metronic/tree/master/laravel/laravel_demo1/starterkit/config
Thanks
OK gotcha, sorry it took me a minute to catch that.
I apologize for any inconvenience caused by the delay. I appreciate your response. To ensure you're using the latest and most up-to-date version, could you please confirm if you are using Metronic version 8.2.0?
You can always download the latest version of the Metronic Starter Kit from the following link:
https://devs.keenthemes.com/metronic/laravel
Yes, I am using version 8.2
Hi,
I apologize for the delay. I'd like to inform you that we no longer provide support for new features in the legacy Laravel version. However, we are here to assist you with any issues you encounter.
It seems like your current workaround of using KTUtil.onDOMContentLoaded
and KTMenu.updateByLinkAttribute
is a great approach to dynamically highlighting the active menu item based on the URL. Unfortunately, within the menu file itself, the dynamic menu highlight in the user page might be limited in the legacy Laravel version.
If you have any further questions or need assistance with any issue, please don't hesitate to ask. We're here to help!
Thanks
Hello,
Im sorry, I am not on an old version of the laravel theme, I just got this within the last few months.
Hi,
Apologise for the delay. May I know which Metronic version you using? Looks like you are using the legacy Laravel.
Thanks
Yes, im using the legacy Laravel version
I just saw I can do it through:
KTUtil.onDOMContentLoaded(function() {
KTMenu.updateByLinkAttribute(window.location.pathname);
});
Is there a more dynamic way to do it within the menu file? Or is this the best option?