thedollarsign/yii2-adminlte-theme

AdminLTE theme for Yii2

Installs: 642

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 3

Forks: 2

Open Issues: 0

Language:HTML

Type:yii2-extension

dev-master 2015-02-18 00:40 UTC

This package is not auto-updated.

Last update: 2024-04-09 01:01:22 UTC


README

First, add following line to the components of your config file.

'components' => [
	...
	'view' => [
	    'theme' => [
	        'class' => 'thedollarsign\themes\adminlte\AdminLTETheme',
	        // Your menu file.
	        'menuFile' => '@app/config/adminlte_file.php',
	        // Name for theme style. (eg. skin-blue, skin-black)
	        'style' => 'skin-blue' 
	    ],
	],
	...
]

Second, create new file backend/config/adminlte_menu.php and add following example for side menu.

<?php
return [
    [
        'label' => 'Dashboard',
        'url' => ['site/index'],
        'icon' => 'fa-dashboard'
    ],
    [
        'label' => 'Items',
        'icon' => 'fa-user',
        'url' => ['site/manage'],
        'items' => [
            [
                'label' => 'Item1',
                'url' => ['site/manage']
            ],
            [
                'label' => 'Item2',
                'url' => ['site/manage']
            ],
        ],
    ],
];

Example

Box widget

<?php 
// Box Widget config
$config = [
	'type' => 'default',
	'header' => 'Header Title',
	'solid' => true,
	'tool' => '<button class="btn btn-default btn-sm" data-widget="remove" data-toggle="tooltip" title="" data-original-title="Remove"><i class="fa fa-times"></i></button>',
	'icon' => 'fa-list'
];
?>
// Box Widget usage
<?php Box::begin($config);?>
	<h1>Your Content</h1>
<?php Box::end();?>