blpraveen
(Blpraveen2004)
March 15, 2012, 7:49am
1
Hi,
I want to know how view is render in case
1)we don’t declare $layout and by default will it take column1.
2)If column2 is present and no column1.
3)if we want column3 is to be rendered then we need to declare public $layout=‘column3’; in the controller.
4)if we want to render in the order column2 > column3 > column4 …and so on then
<?php $this->beginContent('/layouts/column[b]<next>[/b]'); ?>
<div class="container">
<div id="content">
<?php echo $content; ?>
</div><!-- content -->
</div>
<?php $this->endContent(); ?>
Where in <next> we specify the next column to add this content…
bettor
(Live Webscore)
March 15, 2012, 11:02am
2
looking at your questions I can tell that you haven’t read the manual and you haven’t done any testing with the layouts. I strongly encourage you to read the manual and do some testing for better learning experience.
Start from here it answers your first question:
http://www.yiiframework.com/doc/guide/1.1/en/basics.view#layout
then play around with custom views
blpraveen
(Blpraveen2004)
March 15, 2012, 2:03pm
3
I was thinking why the control was taking to coulmn1 even when layout property was not defined and I found answer to my 1 question here http://www.yiiframework.com/ …#88833 … and also
http://www.yiiframework.com/forum …#entry98780
2 question is not correct…if we dont give layouts then only view is renderd and not layouts…
3 question I was not sure and hence I asked the question…but to change different layout we not to define layout property…
4 question … I tried nested layouts … column2 > column3 > column4 and it is working…
I found this link explained completely … http://www.yiiframework.com/ …