Thursday, April 29, 2010

render multiple views within single layout

Hi all bakers,

I have coded like this to render two views in a single controller.

$this->render('upload_photos','layout1');
$this->viewPath = 'ideas';
$this->render('edit_progress',null);

But the problem is it renders layout1 completely after rendering
upload_photos, and then it renders the edit_progress view file along
with rendering layout2.
So in a single page, I am getting both layouts and both view files. I
want upload_photos and edit_progress rendered in layout1's <?php echo
$content_for_layout; ?> area.

Help me please.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: