You are viewing revision #6 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version or see the changes made in this revision.
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 yourviews/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
Demo
http://www.yii2-heart.hafidmukhlasin.com/
username: admin
password: admin
Demo layout
Very nice!
It would be great if you could write a short article about how you built the layout of the demo.
Thanks for your work!
How about Yii 1
It is fantastic!!
could I integrate Yii 1.1.X with fantastic theme AdminLTE? If yes, then how?
Issue with yii2 advanced backend theme
Hi,
I have installed yii2 advanced,and I want to change backend theme.
I followed your instruction,but nothing changed,
Is there any file where I need to tell yii2 that use adminlte theme?
checkbox problem in Gridview of AdminLTE
using this theme if i use checkboxes in gridview then clicking on header checkbox the checkboxs for the remaining records cannot be selected.
Issue with yii2 advanced backend theme
@Muhammad Shahzad
Tutorial updated. It should solve your problem now.
problems installing theme
hi! I'm trying to install adminlte theme following guide but it can run... :(
How extends the css?
Please, how can i customize the AdminLTE.css?
Update AssetBundle path
probably this page must be updated.
I try a fresh Admin-lte installation and the right AssetBundle is:
class AppAsset extends AssetBundle { public $sourcePath = '@bower/'; public $css = ['admin-lte/dist/css/AdminLTE.css']; public $js = ['admin-lte/dist/js/app.js']; public $depends = [ 'yii\web\YiiAsset', 'yii\bootstrap\BootstrapAsset', 'yii\bootstrap\BootstrapPluginAsset', ]; }
Hi,
I've changed the AppAsset.php. But don't understand what to do next. Can anyone please tell step by step with file name. I don't know how to do these two: "check to referring it in your views/layouts/main.php" and "Change your views adhering to html markup vendor/bower/admin-lte/pages". I'm new in Yii2. Please help if anyone can.
Regards,
Siddique
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.