Posted By

bindirtit on 05/16/12


Tagged

php


Versions (?)

Code Igniter: Highlight current page in menu


 / Published in: PHP
 

test create new snippet

  1. <ul>
  2. <li class="<?=($this->uri->segment(1)==='alfa')?'active':''?>"><a href="alfa/index" title="Alfa">Alfa</a></li>
  3. <li class="<?=($this->uri->segment(1)==='beta')?'active':''?>"><a href="beta/index" title="Beta">Beta</a></li>
  4. </ul>

Report this snippet  

You need to login to post a comment.