質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top