Yii Framework Forum: Yii2 theme integration metronic v5 not work - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii2 theme integration metronic v5 not work

#1 User is offline   Vũ Mạnh Cường 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 27-February 15

Posted 03 January 2018 - 02:13 AM

How to integration metronic v5.0 with Yii v2.0.13?
Pls send setting or example.

Is here my setting: Attached File  1.PNG (19.79K)
Number of downloads: 6 but conflix with vendors Kartik as => Attached File  2.jpg (38.43K)
Number of downloads: 6 or Attached File  3.jpg (23.45K)
Number of downloads: 5 or Attached File  Capture.PNG (55.08K)
Number of downloads: 3
0

#2 User is offline   Roberto Braga 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 207
  • Joined: 18-February 13
  • Location:Roma, Italy

Posted 03 January 2018 - 08:41 AM

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users