Quantcast
Channel: Live News for Yii Framework
Viewing all articles
Browse latest Browse all 2943

[Wiki] Tutorial about How to Integrate Yii2 with fantastic theme AdminLTE

$
0
0

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"
  4. Change AppAsset.php located in the directory @ app \ assets \
/**
 * @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
 */
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'css/site.css',
        'adminlte/css/AdminLTE.css', // THIS CHANGE
        ];
    public $js = [
        'adminlte/js/AdminLTE/app.js' // THIS CHANGE
        ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];
}
  1. Finish Now look at the results :)

Viewing all articles
Browse latest Browse all 2943

Trending Articles