CakePHP highlight active menu item for page


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <ul>
  2. <li class="<?php if($this->viewVars['page'] == 'home') { echo 'active'; } ?>"><?php echo $html->link('Home', '/') ?></li>
  3. </ul>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.