How开发者_如何学编程 can I create base theme and sub theme in yii framework?
Take a look at this: http://www.yiiframework.com/doc/guide/1.1/en/topics.theming
If i'm not wrong, you can switch your theme at application, module and controller level if you want to. You just need to place the files in the correct place, as explained in the link.
In short, creating new theme can be done by creating a folder in app_root/themes with the name of the theme, e.g. app_root/themes/mytheme/
Then, you copy the views folder (app_root/protected/views/) to your theme folder and customize it to your heart's content.
Then, you can specify your theme in main config file for app level, in your controller or controller actions.
Theming is pretty straightforward, actually.
P.S. You should only copy those files from protected/views to your theme's /views which you intend to customize. Because every file in your active theme's /views folder overrides the corresponding file in your /protected/views folder.
There is no sub theme function that allows yii to read through the override file first. Its just themes, and you should learn how to separate front/back end first through qiang's tutorial on yii documentation
than go through this book Yii 1.1 Application Development Cookbook it help a lot in theming, you can just theme the crud files and it becomes a simple backend data admin interface.
精彩评论