Welcome Guest, Not a member yet? Register   Sign In
Applying an id/class to an anchor while using the anchor helper.
#1

[eluser]deco10[/eluser]
The subject pretty much says it all Smile

How do I apply a class/id to an anchor tag if I created the anchor with the anchor helper?

Thanks much.


D.
#2

[eluser]deco10[/eluser]
I seem to have resolved this, so this thread can be deleted, unless there is a better way to be doing this.


<?= anchor('../', 'Home', array("class" => "homecls") ); ?>
#3

[eluser]Dam1an[/eluser]
The 3rd paramter is fine, although not sure if it's a great idea to set the path as '../', you should set it to be the name of the controller you want, such as 'home' or just '' (nothing)




Theme © iAndrew 2016 - Forum software by © MyBB