mithun12000 / adminUI

Yii2 admin ui based on AdminLTE free template which is founded on https://github.com/almasaeed2010/AdminLTE
GNU General Public License v2.0
22 stars 19 forks source link

Demo Example using "Basic template" #19

Closed rosimildo closed 9 years ago

rosimildo commented 9 years ago

It would be nice if a demo, describing step by step how to use the module in an application that uses: a) The basic template b) the advanced template

Also, describing the differences between use as an extension and a module.

mithun12000 commented 9 years ago

I develop this using advanced template, but it will work with basic too which i will explain later.

In yii2 you can add 3rd party plug-in in 2 way.

  1. composer way
  2. download source code and manually add code to use as extension and modify as needed there will be not dependency for my update.

i tried to explain this 2 way as use as an extension.

AdminUiBootstrap.php is the file where main configuration written which will decide when to apply this theme. In advanced template we have two different configuration.

  1. backend
  2. frontend.

I choose backend to apply this template.

If you want to use this template for basic Application template then you need to modify AdminUiBootstrap.php

$app->set('view', [
      'class'=>'yii\web\View',
      'theme' => [
      'pathMap' => ['@backend/views' => '@backend/themes/adminui'], // for Admin theme which resides on extension/adminui
      'baseUrl' => '@web/themes/adminui',
],
]);

modify pathMap part to use it.

Let me know if there are more query.