Hi,
Can anyone explain how to get desired
I have a module named ‘Collections’
- protected
– modules
— collections
----- controllers
------ CollectionController.php
----- themes
------ classic
-------- views
--------- layouts
---------- layout.php
--------- view.php
------ modern
-------- views
--------- layouts
---------- layout.php
--------- view.php
----- CollectionModule.php
in CollectionController I have an action ‘view’:
public function init()
{
$this->layout = 'layout';
}
public function actionView($id)
{
Yii::app()->theme = 'modern';
$this->render('view');
}
Now question: What and where should I write to get this work?
-
Each theme must have own layout and own view files.
-
Each theme is placed in /modules/collections/themes/<theme-name> folder
-
Yii::app()->theme = <theme-name>; switches the theme
Is it possible?