Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top