Hello.
I have two AssetBundle. The first one is the parent, used in the general layout (main.php) to connect the same assets on all pages:
class AppAsset extends AssetBundle { public $basePath = ' @web root'; public $baseUrl = ' @web '; public $css = [ 'css/style.css', ]; public $depends = [ 'yii\web\JqueryAsset', 'yii\bootstrap\BootstrapAsset', ]; }
The second is a child; it is used for the photo gallery page, there you need to use your assets, in addition to the main ones, and most importantly, change jquery to the version below. I connect it to the view in which the contents of the photo gallery page are displayed. The bundle itself:
class GalleryAsset extends AssetBundle { public $basePath = ' @web root'; 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', ]; }
How can I redefine the version of jquery in a child asset bundle or, which is the same, on one photo gallery (view) I need (on one page only)?
Thank.