Some yii widgets generates js code (for ajax update or etc.) and this code yii puts to the end of the page. Simular behavior have yii's ClientScript::registerScript() function, i want yii to put this code to external files, and link them in the document. what is the best way to do that?
Asked
Active
Viewed 66 times
0
-
Write all the scripts to a file and then do `Yii::app()->clientScript->registerScriptFile('YOUR_FILE_NAME');` – Think Different Jul 14 '14 at 14:07
-
But what about autogenerated code by widgets? – Suleymanov Rashid Jul 14 '14 at 17:11
1 Answers
0
There are already some extension which might do this, see http://www.yiiframework.com/extensions/?tag=css
This one looks nice. However I could not give you a recommendation because I have never used any of them. We have written our own extension for this purpose.

chris---
- 1,536
- 1
- 13
- 14