I am using Yii2
and have been reading about theming and theme inheritance; however have some questions:
Consider the following example:
'view' => [
'theme' => [
'pathMap' => [
'@app/views' => [
'@app/themes/current',
'@app/themes/default',
],
],
'baseUrl' => '@web/themes/current',
'basePath' => '@webroot/themes/current',
],
],
Now, imagine we request the theme file foo
; as I understand it this will first be looked for in the following order:
@app/themes/current/foo.php
@app/themes/default/foo.php
@app/views/foo.php
Now imagine foo.php
isn't found in the @app/themes/current/
theme, so it would use the file found in @app/themes/default/
.
Now, considering the baseUrl
and basePath
settings I am a little confused how these are used in these situations.
Now, imagine foo.php
references an image file inside the file, wouldn't this still attempt to find @web/themes/current/images/myImage.jpg
rather than @web/themes/default/images/myImage.jpg
?