Welcome Guest, Not a member yet? Register   Sign In
HTML helper: adding classes to li using ul()
#1

[eluser]stef25[/eluser]
I'm using the HTML helper to print out the main navigation of my site in an unordered list. Is there any way I can add a class="active" to a list item?

If
Code:
$this->uri->segment(2) == "red"
I'd like to add class="active" to the html output for that element.


Code:
$list = array(
            'red',
            'blue',
            'green',
            'yellow'
            );




Theme © iAndrew 2016 - Forum software by © MyBB