Layout - notihnio/mgr GitHub Wiki

Mgr introduces layouts in order to support templating. Each module has its own layout directory at

{module directory}/Layout.

You can set a layout on a controller using the controller layout property (layout object instance).

$this->layout->__Name = {Layout Name}

if you want to pass some extra variables to a layout, just pass more attributes to the layout object.

e.x. $this->layout->{Attribute Name} = {Attibute Value}

you can access this property in the layout file:

e.x. $this->{Attribute Name}

####Render Current View in the selected layout

To render the current view content on the layout use the content property of the layout object

in the layout file:

$this->content