Hello Yii users,
I’ve been developing an new theme for Yii and I have the following issues:
When I generate with GII a new model, view it is stored in protected/views
My theme is stored in theme folder outside protected directory.
How can I display into theme/mytheme/site/index.php view an view that is generated into protected/views/…?
Also I’ve tried
but I only get and error
SiteController cannot find the requested view "myview/index".
. My question is where is the render command searching for the view file into theme or protected? and how can be set to search only on theme folder?
generate the views and controller once you are done just move the view files under theme/views folder, make sure to set your theme in config/main.php like so
'theme' => 'mytheme',
// in you controller you just can pass in the name of the file
Thank you for the reply, I though that was the solution.