Snippets

Highlight current page in menu

Paste where needed.

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

Source: http://snipplr.com/view/63068/highlight-current-page-in-menu...

Share this snippet