Contao\FrontendTemplate::section PHP Method

section() public method

Return a custom layout section
public section ( string $key, string $template = null )
$key string The section name
$template string An optional template name
    public function section($key, $template = null)
    {
        if (empty($this->sections[$key])) {
            return;
        }
        $this->id = $key;
        $this->content = $this->sections[$key];
        if ($template === null) {
            $template = 'block_section';
        }
        include $this->getTemplate($template, $this->strFormat);
    }