In my yii 1.1.14 app I use some .js/.css files and I put them in header of layout, which is common for all app.
Also I use some external extentions and I see that these extentions set their own .js/.css files and they are put into the same layout and they are above my .js/.css files.
Seems that is not best way, as these extentions file are somethimes of lower versions then my files.
What is the tge best way of managing my own .js/.css files and files of external extentions ?
use CClientScript to manage scripts (js and css). you can configure mapping of scripts used by framework/components to your own files which should give you proper version across application.assets are hard to track, but this is rather simple - it is Yii jquery (added by some component using Yii::app()->clientScript->registerPackage( ‘jquery’ ); )
<script type="text/javascript" src="/local-yii-tyb.com/tybapp/assets/c0740966/jquery.js"></script> // Reference to lower version that I do
<script type="text/javascript" src="/local-yii-tyb.com/tybapp/assets/c0740966/jquery.yiiactiveform.js"></script>
<script type="text/javascript" src="http://localhost/local-yii-tyb.com/tybapp/assets/mine/jquery/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://localhost/local-yii-tyb.com/tybapp/assets/mine/jquery/jquery.yiiactiveform.js"></script> // jquery.yiiactiveform.js is included twice
of course you need $frontend_root_url defined. you may also map jquery.js -> false in config scriptMap and put your own jquery in template file but it must be loaded as first resource…