I am playing with layout in Yii, and have one question need your help. As I looked into layout view file: "column1.php" I see the beginContent() method:
<?php $this->beginContent('//layouts/main'); ?>
As I read a guiedbook "Agile web development with Yii", it said: [quote]The view being specified here is our main layout page 'layouts/main'. If nothing is specified, it will use the default layout specified either at the controller level, or if not specified at the controller level, at the application level.[/quote] As I understand that the layout specified at the controller level is "layout/column1" (as I have checked value $this->layout). so If I leave this layout empty in the beginContent() method, then it will render "layout/column1", am I right? If so, the new loaded layout will reapeatly load the "layout/colum1" as there's no layout value pass to beginContent() method at this new loaded layout. and I iffer that this will return an error.
But, when I leave this layout value empty. the view file still load as normal. no error occured. I am very supprised with it.
Could someone tell me what has happened?
Thank you.