Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Yii2 comes with a charming twitter bootstrap version 3. But if it is less, then you can integrate with web templates that you like. One example is wonderfull template "adminLTE"

You can use ready-skeleton on GitHub also.

With Yii2 we can do it easily, the following steps

  • Add your composer.json
"bower-asset/admin-lte": "*"
  • Change your AppAsset.php and check to referring it in your views/layouts/main.php
class AppAsset extends AssetBundle
{
    public $sourcePath = '@bower/';
    public $css = ['admin-lte/css/AdminLTE.css'];
    public $js = ['admin-lte/js/AdminLTE/app.js'];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        'yii\bootstrap\BootstrapPluginAsset',
    ];
}
  • Change your views adhering to html markup vendor/bower/admin-lte/pages
9 0
22 followers
Viewed: 131 611 times
Version: 2.0
Category: How-tos
Written by: ThePr0f3550r
Last updated by: YiiJeka
Created on: Jul 11, 2014
Last updated: 9 years ago
Update Article

Revisions

View all history

Related Articles