Difference between #3 and #7 of
Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Changes

Title unchanged

Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

yii2, theme, adminLTE

Content changed

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" ](http://almsaeedstudio.com/AdminLTE/
 
 
With Yii2 we can do it easily, the following steps 
 
 
1. Download adminLTE of http://almsaeedstudio.com/AdminLTE/ 
 
2. extract to a directory, @ app \ web \ 
 
3. Change the folder name becomes "
"AdminLTE") 
 
 
#### You can use ready-skeleton [on GitHub](https://github.com/dmstr/yii2-adminlte-asset) also.
 
 
With Yii2 we can do it easily, the following steps 
 
 
- Add your composer.json 
 
 
```php 
"bower-asset/
admin-lte" 
 
4.
: "*"
 
```
 
 
-
Change your `AppAsset.php located in the directory @ app \ assets \ 
 
 
```php 
/**
 
 * @link http://www.yiiframework.com/
 
 * @copyright Copyright (c) 2008 Yii Software LLC
 
 * @license http://www.yiiframework.com/license/
 
 */
 
 
namespace backend\assets;
 
 
use yii\web\AssetBundle;
 
 
/**
 
 * @author Qiang Xue <qiang.xue@gmail.com>
 
 * @since 2.0
 
 */
` and check to referring it in your `views/layouts/main.php`
 
 
 
```php
class AppAsset extends AssetBundle { public $bassourcePath = '@webroot';
 
    public $baseUrl = '@web';
 
    public $css = [
 
     'css/site.css',
 
    
bower/';
 
    public $css = [
'admin-lte/css/AdminLTE.css', // THIS CHANGE
 
    
]; public $js = [
 
    
'admin-lte/js/AdminLTE/app.js' // THIS CHANGE
 
    
]; public $depends = [ 'yii\web\YiiAsset', 'yii\bootstrap\BootstrapAsset', ];
 
}
 
```
 
 
5. Finish 
 
Now look at the results :)
    'yii\bootstrap\BootstrapPluginAsset',
 
    ];
 
}
 
```
 
 
- Change your views adhering to html markup `vendor/bower/admin-lte/pages`
9 0
22 followers
Viewed: 133 755 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