var in layout for clientscript..

Now we can turn the clientscript off by making an arryMap in the config…

And just put the script tags in layout but this causes 2 problems.

  1. Gii stops working. Because it cannot load jquery…

  2. I would like to have the script tags from registerScript before my own in layout.

I remember cakePhp had this… it be nice if we just have something in the layout like.

<?php echo $this->script;?>

<?php echo $this->css;?>

It is easy to move it around or disable it all together… As in 1.1.3 I have found that even if I put the layout to false it will still inject the javascript in them. (I know about renderPartial but still it’s weird).