Renders the container for the HTML template.

@param string $layout Page layout passed from template.
@param string $title Page title passed from template.

@return string
1289
public function renderContainer($layout = null, $title = null)
    {
        return sprintf(
            "<div class=\"%s\">\n%s</div>\n",
            $this->getContainerClass(),
            $this->renderChildren($layout, $title)
        );
    }
470776
public function renderSelf($layout = null, $title = null)
    {
        return $this->getController()->customise([
            'Self' => $this,
            'Title' => $title,
            'Layout' => $layout
        ])->renderWith($this->getTemplate());
    }
288063
public function viewContent($layout, $data = array())
    {
        $data = array_merge($data, array('body' => array(
            'attributes' => array('class' => static::$tplPrefixClass.str_replace('::', '-', $layout))
        )));

        return $this->layout->content = View::make($layout, $this->getCommonVars($data));
    }
883464
public function setLayout(Layout $layout, AbstractClassContent $toPushInMainZone = null)
    {
        $this->_layout = $layout;

        $count = count((array) $layout->getZones());
        // Add as much ContentSet to the page main ContentSet than defined zones in layout
        for ($i = $this->getContentSet()->count(); $i < $count; $i++) {
            // Do this case really exists ?
            if (null === $zone = $layout->getZone($i)) {
                $this->getContentSet()->push(new ContentSet());
                continue;
            }

            // Create a new column
            $contentset = new ContentSet(null, $zone->options);

            if (null !== $toPushInMainZone && true === $zone->mainZone) {
                // Existing content push in the main zone
                $contentset->push($toPushInMainZone->setMainNode($this));
            } elseif ('inherited' === $zone->defaultClassContent) {
                // Inherited zone => same ContentSet than parent if exist
                $contentset = $this->getInheritedContent($i, $contentset);
            } elseif ($zone->defaultClassContent) {
                // New default content push
                $contentset->push($this->createNewDefaultContent(
                    'BackBee\ClassContent\\'.$zone->defaultClassContent,
                    $zone->mainZone
                ));
            }

            $this->getContentSet()->push($contentset);
        }

        return $this;
    }
502823
public function view($layout='default', $name='')
	{
		$view = new View(array(
			'folder'  => $this->_type,
			'element' => $this->_name,
			'name'    => ($name   ?: $this->_name),
			'layout'  => ($layout ?: 'default')
		));
		return $view;
	}
755935
public function setLayout($layout)
    {
        if (strpos($layout, ':'))
        {
            $layout = explode(':', $layout);
            $layout = str_replace('.html', '', array_pop($layout));
        }

        return parent::setLayout($layout);
    }
1205871
protected function renderTitle($title)
    {
        $obj = $this->obj();
        if ($obj->view()) {
            return $obj->render((string)$title, $obj);
        } else {
            return (string)$title;
        }
    }
364376
public function render($response, $layout, $values=array()) {
		$this->fillValues($values);
		$response->collectFrom($layout, $values);
		return $response;
	}
1078044
private function render_layout()
    {
        $snap_layout_path = \locate_template(Config::get('theme.templates_directory') . '/' . $this->extends);

        if ($snap_layout_path === '') {
            throw new Templating_Exception('Could not find layout: ' . $this->extends);
        }

        /**
         * Keep PHPStorm quiet.
         *
         * @noinspection PhpIncludeInspection
         */
        include $snap_layout_path;
    }
437527
public function extend_layout_titles( $title, $field, $layout ) : string {

		if ( ! empty( get_sub_field( 'heading' ) ) ) {
			$title .= ': ' . get_sub_field( 'heading' );
		}

		return apply_filters( 'hogan/extend_layout_title', $title );
	}
778777
public function setLayout( $template )
	{
		$template = str_replace( get_stylesheet_directory().'/templates/', '', $template );
		$this->template = UtilityFacade::trimRight( $template, '.php' );
		return $this->get( apply_filters( 'castor/templates/layout', 'layouts/default' ));
	}
1081746
public function render($view = null, $layout = null)
    {
        $view = $this->_getFormView($view);
        return parent::render($view, $layout);
    }
1006453
public function header($PAGE_TITLE)
    {
        $this->set('PAGE_TITLE', $PAGE_TITLE);
        $this->set('BREADCRUMBS', $this->breadcrumbs());

        return $this->parse(INCLUDEDIR.'/header.template.html');
    }
764162
public function compile($layout = true)
    {
        $code = $this->trim($this->source);
        $buffer = '';
        $open = array();
        
        Tokenizer::i($code)->tokenize(function ($node) use (&$buffer, &$open) {
            switch ($node['type']) {
                case Tokenizer::TYPE_TEXT:
                    $buffer .= $this->generateText($node, $open);
                    break;
                case Tokenizer::TYPE_VARIABLE_ESCAPE:
                    $buffer .= $this->generateEscape($node, $open);
                    break;
                case Tokenizer::TYPE_VARIABLE_UNESCAPE:
                    $buffer .= $this->generateVariable($node, $open);
                    break;
                case Tokenizer::TYPE_SECTION_OPEN:
                    $buffer .= $this->generateOpen($node, $open);
                    break;
                case Tokenizer::TYPE_SECTION_CLOSE:
                    $buffer .= $this->generateClose($node, $open);
                    break;
            }
        });
        
        //START: This is more to help troubleshooting
        if (count($open)) {
            foreach ($open as $i => $item) {
                $open[$i] = sprintf(self::ERROR_LINE, $item['value'], $item['line']);
            }

            throw new Exception(sprintf(self::ERROR_MISSING_CLOSING, implode(self::ERROR_AND, $open)));
        }
        //END: This is more to help troubleshooting
        
        if (!$layout) {
            return $buffer;
        }

        return sprintf(self::$layout, $buffer);
    }
184398
public function renderSelf($layout = null, $title = null)
    {
        if ($this->hasSourceComponent()) {
            
            $source = $this->SourceComponent();
            
            if ($this->StyleID) {
                $source->StyleID = $this->StyleID;
            }
            
            $source->loadRequirements();
            
        }
        
        return parent::renderSelf($layout, $title);
    }
58347
function GrantAddContentToLayout(Layout $layout)
    {
        //dummy content for evaluation
        $content = new Content();
        $content->SetUserGroup($layout->GetUserGroup());
        $layoutRights = $layout->GetUserGroupRights();
        if ($layoutRights)
        {
            $content->SetUserGroupRights($layoutRights->GetContentRights());
        }
        return $this->Grant(BackendAction::Create(), $content);
    }
1373302
public function displayWithLayout($templateFile = '', $layout = 'master', $layoutInOtherApp = false, $tplInOtherApp = false)
    {
        $this->layout = Cml::getApplicationDir('apps_path') . DIRECTORY_SEPARATOR
            . ($layoutInOtherApp ? $layoutInOtherApp : Cml::getContainer()->make('cml_route')->getAppName())
            . DIRECTORY_SEPARATOR . Cml::getApplicationDir('app_view_path_name') . DIRECTORY_SEPARATOR
            . (Config::get('html_theme') != '' ? Config::get('html_theme') . DIRECTORY_SEPARATOR : '')
            . 'layout' . DIRECTORY_SEPARATOR . $layout . Config::get('html_template_suffix');
        $this->display($templateFile, $tplInOtherApp);
    }