TP5.1 How to implement navigation highlighting
Jackie
Jackie 2019-07-16 23:15:36
0
2
1181

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.

01.png

02.png

03.png

Jackie
Jackie

reply all(1)
秋香姐家的小书童

It would be better if you write this in JS

  • reply Okay, I'll give it a try. I've been struggling with this TP method, but I didn't expect JS
    Jackie author 2019-07-21 10:29:40
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template