Reputation: 449
I've gone through the steps in the guide, however my request to index.php gives me "Object not found!"
I have created dirs:
have the web.php changed to
'components' => [
'view' => [
'theme' => [
'pathMap' => ['@app/views' => '@app/themes/basic/views'],
'baseUrl' => '@web/themes/basic/views',
]
],
and my AppAsset.php is like
public $basePath = '@webroot';
public $baseUrl = '@web';
Where I could go wrong? Also, in cases like this, how can I use debugging?
Upvotes: 2
Views: 4468
Reputation: 9357
The guide does not tell you to create the directory @web/themes, it tells you to create @app/themes. So you have created the theme folder in the wrong place. The reason why you should NOT have it in @web is that the entire @web folder is opened to the public, your themes are php files and should not be opened to the public.
@web is basically yourapplicationfolder/web, @app is yourapplicationfolder
In case you use the advanced template yourapplicationfolder is either frontend or backend. Also when I used the theme I configure it like this
'view' => [
'theme' => [
'pathMap' => [
'@app/views' => '@app/assets/theme/views',
],
'baseUrl' => '@web/',
],
],
Notice that I still have 'baseUrl' => '@web/',
Upvotes: 4