[eluser]greg.thompson[/eluser]
Hi guys, I'm building my first application with CI and I'm at a point where I'm calling a navigation view within a template view. What I need to do is have the ability to add a class to the currently active navigation element/controller. Here's my navigation view...
Code:
<ul>
<li><?=anchor('admin/files/', 'Files', 'class = "f_log"'); ?></li>
<li><?=anchor('admin/buckets/', 'Buckets', 'class = "b_log"'); ?></li>
<li><?=anchor('admin/users/', 'Users', 'class = "u_log"'); ?></li>
<li><?=anchor('admin/settings/', 'Settings', 'class = "s_log"'); ?></li>
</ul>
Being called like this...
Code:
<?php $this->load->view('includes/navigation'); ?>
Now I know I could use something like the uri segment feature but is there anyway to do this without jquery/javascript etc?