Layout and Columns


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 -->


<?php $this->endContent(); ?>

Where in <next> we specify the next column to add this content…

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:

then play around with custom views

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 … and also

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 …