loadLayout Method

This method will be loaded a layout from a theme.

The $layout value will be reffered to a file name under app/view/THEME/page/.

Layout Requirements

The valid layout should only put inside page directory.

|-- page
|---- col-1.php
            

Basic Usage:

Here is the basic usage of Controller::loadLayout.

Controller::loadLayout(string $layout): ControllerObject
            

Example

Here is the example for loadLayout method:

class Home extends SENE_Controller
{
  public function __construct()
  {
    parent::__construct();
    $this->setTheme('homepage');
  }
  public function index()
  {
    $this->loadLayout('col-1');
  }
}
            

So, the homepage theme and col-1 layout should be existed on the directory structure.

- app
|-- view
|--- homepage
|---- page
|----- col-1.php