Css Registered In View

each view has a different CSS that must be rendered after the CSS that registered in layouts, what’s the solution? because the CSS registered in the view will be rendered first

Hi,

Use the Yii methods to register js or css file :)


$baseUrl = Yii::app()->baseUrl;

Yii::app()->getClientScript()->registerScriptFile($baseUrl.'/js/yourscript.js');

Yii::app()->getClientScript()->registerCssFile($baseUrl.'/css/yourcss.css');

I’m create an extension for this,

specified-target-clientscript

Hi ! i have a similar issue. I want to use registerCss inline (wihtout use any file css) to changue some features of my view. How to set it in a file ?

Thanks! :)