Welcome Guest, Not a member yet? Register   Sign In
anchor problem
#1

[eluser]sojic[/eluser]
Code:
($row->link==$this->uri->segment(2)) ? $attr = array('class' => 'active') : $attr = array();
    $link = array($parent, $row->link);
    $out.='<li>' .anchor($link, $row->text, $attr) . '</li>';

The idea is to detect active page and to add class="active".

The result is <a href="link">


Messages In This Thread
anchor problem - by El Forum - 12-01-2008, 12:35 PM
anchor problem - by El Forum - 12-01-2008, 03:21 PM
anchor problem - by El Forum - 12-02-2008, 07:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB