How to correctly highlight the current navigation in template inheritance? (Waiting online...)

WBOY
Release: 2016-10-22 00:00:18
Original
1250 people have browsed it

How to correctly highlight the current navigation in template inheritance? (Waiting online...)

Similar to the navigation above, I used the principle of template inheritance to define a base.html file in thinkphp, which contains the general header, nav navigation, and footer bottom. Other html files will inherit this base.html template.

  • How can I highlight the navigation corresponding to the current page when visiting other pages?

  • As shown in the picture above, when I visit the actual page, how can I highlight the navigation corresponding to the current page, if the navigation is a multi-level navigation?

  • When I visit the sub-navigation corresponding to the main navigation, how can I correctly highlight the main navigation on the sub-navigation of the corresponding page?

Waiting online, I hope all my friends can help me with my doubts.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template