Yii2 theme integration metronic v5 not work

How to integration metronic v5.0 with Yii v2.0.13?

Pls send setting or example.

Is here my setting: 7580

1.PNG

I’m working too with metronic 5 and I have to say that is a good example of very bad template design.Probably you got the template with all vendors (jquery, bootstrap, dropzone …) bundle and template bundle compiled together, different vendors mixed… (bad design).

The error you have is that theme assets file are not published correctly, 404 error is file not found

Without having full picture of you installation is a bit difficult:

  1. since theme assets are fixed put them outside assets directory, create css and js under web and put theme here, point them directly from the template

  2. if you can recompile the theme excluding vendors is the best, if you can’t recompile you should exclude them on yii side.

Configure your assets manager as follow:




'assetManager' => [

	'bundles' => [

    	'yii\web\JqueryAsset' => [

        	'js'=>[],

        	'depends'=>['app\assets\AppAsset']


    	],

    	'yii\bootstrap\BootstrapPluginAsset' => [

        	'js'=>[]

    	],

    	'yii\bootstrap\BootstrapAsset' => [

        	'css' => [],

    	],


	],

],



This is just for the basic, if you find more conflict add consequently.

P.S.

Consider that you can’t use Yii2 menu and pager widgets as metronic5 use a completely different structure than bootstrap classic (bad design for a botostrap based theme), I had to override both.

Probably more components will not work.