I have one asset bundle (AppAsset) which registered in my main layout (main.php) for common assets for the entire application:
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/style.css',
];
public $depends = [
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
];
}
But on one certain page (not on entire app!) i need to change my jquery to a lower version and hook up other assets. And i'm registeting another asset bundle which depends on main asset bundle AppAsset in the desired view file :
class GalleryAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/gamma/style.css',
'css/gamma/noJS.css',
];
public $js = [
'js/gamma/modernizr.custom.70736.js',
'js/gamma/jquery.masonry.min.js',
'js/gamma/jquery.history.js',
'js/gamma/js-url.min.js',
'js/gamma/jquerypp.custom.js',
'js/gamma/gamma.js',
];
public $depends = [
'app\assets\AppAsset',
];
}
The question is how can i change the Jquery's version in child asset bundle GalleryAsset or in one certain view file (page)?
Thank you and God bless helpers.