Hi, guys.
I have two app controllers here.
"AppController_A" (which has "app_layout_a")
"AppController_B" (which has "app_layout_b")
The application default layout is "app_layout_a" in my config file.
And in my module, there are also two controllers like,
"ModController_A" and "ModController_B".
Both of them have no layout file.
When "AppController_A" links to "ModController_A",
ModController_A uses "app_layout_a".
This is fine.
But, "AppController_B" links to "ModController_B",
"ModController_B" uses "app_layout_a" too.
I want to use "app_layout_b" in "ModController_B".
So I write some code in ModController_B::init() like following:
public function init(){ Yii::log(Yii::app()->layoutPath, 'info', ''); $this->layout = 'app_layout_b'; }
This doesn't work.
Though, log shows layoutPath is application layout path.
It makes no sense to me.
Does anyone help?
Regards.