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

前端 未结 5 540
渐次进展
渐次进展 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:48

    I use the below code - cheers!

    uri->segment(1)=='dashboard' && $this->uri->segment(2)=='')? 'active' : ''; ?>
    

提交回复
热议问题