how i can manage asset register in a layout?


i need give all css and js url in a layout and i not want register.

How do i implement this scenario?

for example


use app\assets\Asset1;

use app\assets\Asset2;



output in header layout


  <!-- css and js tag not registered -->


   // manage by developer

   var js  = {

     '' : {

         '' : {}, //this is dependency



   var css = ['',''];



Register js file and register css file are both documented on that page.




[color="#303336"][font="inherit"] [/font][/color]

[color="#303336"][font="inherit"][size="2"]If you want it to output like you have above you will need to make your own function to do so[/size][/font][/color]

no, actually i want use AssetBundle with output array of js & css url.

If the above doesn’t work you will need to make your own class to do this since assetBundels don’t output in that format.

thanks. i waiting this answer. but i think this feature must be added because how i can use Yii AssetBundle and fallback project ?

You have to write a plugin yourself that most likely would extend assetBundle.