I developped an application with Yii that allow user to choose one of template (themes) sthat exist in the application,
he can swith the template whenever hewants, but my solution seems to be limited.
I explain my solution :
For example i have 5 templates to include to my application, and i have a "News" crud (NewsController and its views), so i create in views folder 5 folders that are related to NewsController :
- folder 1 :theme2_news
- folder 2 :theme2_news
- folder 3 :theme3_news
- folder 4 :theme4_news
- folder 5 :theme5_news
and when i want to swicth from one theme to an other, i do like that :
$this->render("/themex_news/create")I tried this solution and it's great, but the problem is that when i want to add many templates (themes) i must create for each controller it's view, and when the number of template become big, the view folder will have thounds of folders.
I took a look to Yii Theming but it seems to me more limited then my solution.
Is there any ideas ??
Thanx !

Help














