Hello everybody!
I would like to get any tips and hints on the next question: I need to set some class for hyperlink when the site user is on this page.
For example:
page = contacts.html
menu item = <li><a href="/contacts.html">Contacts</a></li>
I want to get such link <li><a class="accent" href="/contacts.html">contacts</a></li>
Following code =
array('label'=>'Contacts', 'url'=>array('/site/contacts'),
'accent' => Yii::app()->controller->getId() == 'contacts')
returns the code =
<li class="active"><a href="/contacts.html">Contacts</a></li>
i.e. the class will be set to LI tag… and this class named ACTIVE
What do I need to do?
help me please!