wkii/yii2-adminlte
最新稳定版本:1.0.7
Composer 安装命令:
composer require wkii/yii2-adminlte
包简介
AdminLTE theme for Yii2 Framework
关键字:
README 文档
README
This project is out of maintenance.
Recommended use: https://packagist.org/packages/dmstr/yii2-adminlte-asset
Yii2 AdminLTE Asset Bundle
Backend UI for Yii2 Framework, based on AdminLTE v2.x
This package contains an Asset Bundle for Yii 2.0 Framework which registers the CSS files for the AdminLTE user-interface.
AdminLTE template require Font Awesome, so must installed composer plugins asset-plugin.
composer global require "fxp/composer-asset-plugin:~1.0.0"
Installation
The preferred way to install this extension is through composer.
To install AdminLTE v2 run:
composer require wkii/yii2-adminlte
Quick Start
Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component:
For Yii 2 Application Template or Basic Application Template
'components' => [ 'view' => [ 'theme' => [ 'pathMap' => [ '@app/views' => '@vendor/wkii/yii2-adminlte/example-views/yii2-app' ], ], ], ],
This asset bundle provides sample files for layout and view (see folder example-views/yii2-app), they are Don't modify in the vendor/ folder.
Therefore it is recommended to copy the views files into your application views folder and adjust them to your needs.
Customization
- Copy files from
vendor/wkii/yii2-adminlte/example-views/yii2-app(or other theme) to@app/views. - Remove the custom
viewconfiguration from your application by deleting the path mappings, if you have made them before. - Edit your views adhering to html markup
vendor/almasaeed2010/adminlte/pages
AdminLte Skins
By default the extension uses skin-blue for AdminLTE. You can change it in config file.
'components' => [ 'assetManager' => [ 'bundles' => [ 'Wkii\AdminLTE\Asset\AdminLteAsset' => [ 'skin' => 'skin-red', ], ], ], ],
Here is the list of available skins:
"skin-blue",
"skin-blue-light",
"skin-yellow",
"skin-yellow-light",
"skin-green",
"skin-green-light",
"skin-purple",
"skin-purple-light",
"skin-red",
"skin-red-light",
"skin-black",
"skin-black-light
For Menu
Example menu see main-sidebar.php.
This Widget is extends yii\widgets\Menu. Menu item add icon attribute. use Font Awesome icon.
e.g.
['label' => 'Gii', 'url' => ['/gii'], 'icon' =>'fa-gavel']
Layout
Default layout is main.php.
add single single page layout. No sidebar, no control-sidebar, no footer, no content-header, no breadcrumbs. for iframe dialog.
Pjax
pjax templates use yiisoft/jquery-pjax.
pjax layout is pjax-main.php. It's include pjax-main-content.php.
pjax-content.php output only content of div #pjax-container.
Use pjax, you can change it in config
'layout' => 'pjax-main',
'components' => [
// ......
]
Or your Controller add attribute
public $layout='pjax-main';
Controller action example:
public function actionWelcome()
{
if (Yii::$app->request->isPjax) {
$this->layout = 'pjax-content';
return $this->render('welcome');
} else {
return $this->render('welcome');
}
}
Further Information
For AdminLTE documentation, please read
For Pjax, please read
统计信息
- 总下载量: 1.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-08-21