Hi! Waht should i do to make it dynamic my themes I have several themes here!
The situation is this the themes are store in themes directory right! now the names of it are store in database, I like to call it and put in config but how?
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'name'=>'My Web Application',
'theme'=>'mytheme is here!',
Where to put the “Yii::app()->theme=‘mytheme’” co’z I place it in config/main and it works, but how to call it from databases?
The plan is the radio button should contain a theme name and update it to the database and retrieve or use it with this function Yii::app()->theme=‘mytheme’ but how to declare and where to place?
There’re different variants depends on your exact application.
You may create component, for example. Or you may start with /components/Controller.php, put call to themes-table and set current theme in init() method. I order to handle themes you may, for example, create /controllers/ThemeController.php and put related functionality there.
Again, definite solution depends on your application design.