Currently, my method can only highlight the currently selected navigation when clicking on a certain category. However, when clicking on an article to view details, the ID value is still obtained, and the corresponding controller cannot be determined, which results in Only the article ID and category ID are judged to match the navigation highlighting. What I need is to judge the controller and ID values at the same time to achieve navigation highlighting. For example: if "Front-end Development" is selected, the option will be highlighted. When an article under this category is clicked, it will be highlighted based on the category ID.
It would be better if you write this in JS