yii2 theme

Where is the proper place to put theme file according to yii2 standard?

I has read these guide :

http://www.yiiframework.com/doc-2.0/guide-output-theming.html

From this guide, it looks like i should put theme inside @app.

http://www.bsourcecode.com/yiiframework2/install-new-theme-in-yiiframework-2/

From this guide, it looks like i should put theme also inside @app.

So i download this themes

material-simple

greenery

material-default

metro

I use yii2 basic

In config i has try both of this


'view' => [

            'theme' => [                

                'basePath' => '@app/themes/theme_name',

                'baseUrl' => '@web/themes/theme_name',

                'pathMap' => [

                    '@app/views' => '@app/themes/theme_name',

                ],

          ]

        ],

or


 'view' => [

             'class' => 'yii\web\View',

             'theme' => [

               'class' => 'yii\base\Theme',

               'pathMap' => ['@app/views' => '@app/themes/theme_name'],

               'baseUrl'   => '@web/themes/theme_name'

             ]

         ],

Using either of code above, theme material-simple and metro work fine with theme file put inside @app/themes/theme_name.

But theme material-default and greenery require me to put theme file inside @web/themes/theme_name as well. If i dont do this, the page will display as plain html, no style at all.

Is place theme file in both place correct thing to do? Am i doing something wrong?

Anyone know where i can find modern responsive yii2 framework? Theme on yii2 themefactory, nearly all of them seem to be nonresponsive.

I put my theme in \web\themes\ksetrin (ksetrin is name of my theme)

and config




'view' => [

			'theme' => [

			  'class' => 'yii\base\Theme',

			  'pathMap' => ['@app/views' => '@app/web/themes/ksetrin'],

			  'baseUrl' => '@web/themes/ksetrin'

			]

		],



Yes, when i write @web, i mean in folder application/web like yours. Theme folder has layout/main.php file, i’m not sure if it safe for this file to be in web accessible folder, thats why i create this topic, aside from i feel weird of the need to put file in both @app and @web for material-default theme.