How To Render A Layout

Hi there,

I’m having a problem when trying to render a partial layout. For example my main layout consists of header, body and footer. body is the content. I want to render header file and footer file in main.php. How can I archive that ?



$this->render / $this->renderPartial

Or you can use widgets for that.

Multiple ways as ORey mentioned.

Alternatively, if you want to have nested & embedded layouts (e.g. different view layout files called header.php, body.php, and footer.php), you can create a master layout (main.php) embedding these sub-layouts like this:


//header layout content here



//body layout content here



//footer layout content here