Hi, Like layout changing in CMS sites, Yii have any support for changing layout from the UI, by avoiding layout code editing?
Thanks.
Hi, Like layout changing in CMS sites, Yii have any support for changing layout from the UI, by avoiding layout code editing?
Thanks.
Hi
You could set it dynamically in components/Controller.php
public function init() {
parent::init();
...make SQL query to select the current theme...
Yii::app()->theme = 'yourChoosenTheme1';
Thanks for rply.
Dynamically means…?
Dynamically means that the value of variable (in your case the theme) is depended by few condition (like user, or time of the request or anything you want)
For example theme may depended by
user id or permission or his role,privileges etc
winner, summer etc
I meant , like CMS (joomla, wordpress)- we change the layout form UI. Without opening the code. Like that editing is possible in yii?
eg. slider in left side bar move to right side bar
Thanks.