Question

What is the best practice of using those yii CHtml::link and such others? I'm making a button which I need to have an icon some text and responds to hover events and it must be quite wide

Is there any advantage of using CHtml over regular tag which I can quickly customise using some CSS and jquery?

Was it helpful?

Solution

You can use either, but if you're using the framework why not use the built in methods. If you're building a stylish button in the css. Just apply it to the CHtml::link(). It also means that should your routes ever change that they will automatically be updated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top