search

Home  >  Q&A  >  body text

TP5.1 How to implement navigation highlighting

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

JackieJackie1965 days ago1163

reply all(2)I'll reply

  • 秋香姐家的小书童

    秋香姐家的小书童2019-07-20 09:47:18

    It would be better if you write this in JS

    reply
    0
  • Jackie

    Okay, I'll give it a try. I've been struggling with this TP method, but I didn't expect JS

    Jackie · 2019-07-21 10:29:40
  • Cancelreply