Issue
Well, this part is very important. I'm working on a project with YII. I faced a problem like, I was trying to set one of my action in controller with a layout. 1st of all, this action not even taking the default layout mentioned, where another action actionIndex()
is working fine on the same controller. Then I tried for $this->layout='//layouts/new'
in the controller even triend it on the view rendering to the controller. That's even not working. I checked whether it returns any $content
to the layout new.php
or not. But it's not even coming to new.php. die()
is not working even if I put it on the 1st line of the layout. I need help on this.
Solution
public function actionTest() {
$this->layout = 'new';
$this->render('test');
}
create new layout in views/layouts folder.
Answered By - hemc4
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.