Eine Option wäre das folgende Beispiel:
Fügen Sie in der Konfigurationsdatei des Projekts @ frontend / config / main.php Folgendes hinzu:
Eine Option wäre das folgende Beispiel:
Fügen Sie in der Konfigurationsdatei des Projekts @ frontend / config / main.php Folgendes hinzu:
'components' => [ 'view' => [ 'on beforeRender' => function () { if (!\skeeks\cms\backend\BackendComponent::getCurrent()) { \Yii::$app->assetManager->bundles['yii\web\JqueryAsset'] = [ 'class' => '\frontend\assets\YourJqueryAsset', ]; } }, ], ]
Frontend \ Assets \ YourJqueryAsset:
namespace frontend\assets; /** * @author Semenov Alexander <semenov@skeeks.com> */ class DigiproJsPluginsAsset extends DigiproAsset { public $sourcePath = '@webroot/'; public $css = []; public $js = [ 'jquery-version.min.js', ]; public $depends = []; }
Option Redefinition nicht nur Jquery, sondern auch alle anderen Skripte.
- Семенов Александр
- /
- 22.05.2018
- /
- 0
- /
- 7915
Alle Kommentare (0)