CodeIgniter: How to 'highlight' the link of the page the user is currently on?

前端 未结 5 580
渐次进展
渐次进展 2021-01-02 21:12

Fairly new to CodeIgniter, still grasping the MVC approach. I\'m just wondering what\'s the best way to solve this:

I got my navigation bar highlighting the currentl

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-02 21:46

    Non-specific to CI this is just logical checks agains the current page name.

    When you get the page name in CI such as

    $pageName = 'blog.html';
    

    Then you can do the following

    >Index
    >Blog
    

提交回复
热议问题