سؤال

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