Returns the layout of the page.

@return string|null
496260
public function layout()
    {
        $exists = (boolean) isset($this->data['layout']);

        return $exists ? $this->data['layout'] : null;
    }
300956
protected function getThemeAssistantStylesheet()
	{
		if (!$GLOBALS['objPage'] || !$GLOBALS['objPage']->getRelated('layout')) {
			return null;
		}
		if (!$stylesheets = $GLOBALS['objPage']->getRelated('layout')->external) {
			return null;
		}

		$stylesheets = \StringUtil::deserialize($stylesheets);
		foreach ($stylesheets as $stylesheet) {
			$file = \FilesModel::findByUuid($stylesheet);
			if ($file && $file->path && file_exists(TL_ROOT . '/' . $file->path . '.base')) {
				return $file->path . '.base';
			}
		}

		return null;
	}
388283
public function render()
    {
        if ( ! $this->hasPages()) {
            return null;
        }

        return sprintf(
            $this->wrapper,
            $this->getPreviousButton(),
            $this->getLinks(),
            $this->getNextButton()
        );
    }
690395
public function getTemplate()
    {
        if (null === $this->template) {
            $this->template = $this->getTemplatePathDefault('layout');
        }

        return $this->template;
    }
159210
public function getLayoutOptions()
    {
        if (!($theme = Theme::getEditTheme())) {
            throw new ApplicationException(Lang::get('cms::lang.theme.edit.not_found'));
        }

        $layouts = Layout::listInTheme($theme, true);
        $result = [];
        $result[null] = Lang::get('cms::lang.page.no_layout');

        foreach ($layouts as $layout) {
            $baseName = $layout->getBaseFileName();

            if (FileDefinitions::isPathIgnored($baseName)) {
                continue;
            }

            $result[$baseName] = strlen($layout->name) ? $layout->name : $baseName;
        }

        return $result;
    }
1180886
public function getBackendLayoutForPage(int $uid) {
    $rootLine = $this->pageRepository->getRootLine($uid);

    if ($rootLine) {
      $index = -1;

      foreach($rootLine as $page) {
        $index++;

        $backendLayout             = $page['backend_layout'];
        $hasBackendLayout          = false;
        $backendLayoutNextLevel    = $page['backend_layout_next_level'];
        $hasBackendLayoutNextLevel = false;

        if (!empty($backendLayout)) {
          $backendLayout = str_replace(self::BACKEND_LAYOUT_PREFIX, '', $backendLayout);
        }

        if (!empty($backendLayout) && $backendLayout != '-1') {
          $hasBackendLayout = true;
        }

        if (!empty($backendLayoutNextLevel)) {
          $backendLayoutNextLevel = str_replace(self::BACKEND_LAYOUT_PREFIX, '', $backendLayoutNextLevel);
        }

        if (!empty($backendLayoutNextLevel) && $backendLayoutNextLevel != '-1') {
          $hasBackendLayoutNextLevel = true;
        }

        if ($index == 0 && $hasBackendLayout) {
          return $backendLayout;
        } elseif ($index > 0 && $hasBackendLayoutNextLevel) {
          return $backendLayoutNextLevel;
        }
      }
    }

    return null;
  }
566742
public static function getLayoutClassName()
    {
        if (is_callable(self::$layoutClassName)) {
            $func = self::$layoutClassName;
            return $func();
        }

        return self::$layoutClassName;
    }
1261599
public function getHtml() {
	   if ($this->getPageTotal() < 2) {
	       return null;
       }
       return str_ireplace(array(
				'{total}',
				'{pageSize}',
				'{start}',
				'{end}',
				'{pageTotal}',
				'{previous}',
				'{next}', 
				'{list}',
				'{goto}',
		), array(
				$this->get('total'),
				$this->setPageSize(),
				$this->getStart(),
				$this->getEnd(),
				$this->pageTotal,
				$this->getPrevious(),
				$this->getNext(),
				$this->getPageList(),
				$this->getGoToPage(),
		), $this->get('template'));
	}
854909
public function getNextPage()
    {
        $nextPageIndex = $this->currentPage->getIndex() + 1;
        if (!$this->formDefinition->hasPageWithIndex($nextPageIndex)) {
            return null;
        }
        return $this->formDefinition->getPageByIndex($nextPageIndex);
    }
890399
public function getPanel()
	{

		$template = "..." . substr(self::$template, -self::$pathLen);
		$layout = "..." . substr(self::$layout, -self::$pathLen);

		$html = "<h1>Cms</h1>";
		$html .= "<div class='nette-inner'>";
		$html .= "<h2>Used template: <br><b title='" . self::$template . "'>" . $template . "</b></h2>";
		$html .= "<h2>Used layout: <br><b title='" . self::$layout . "'>" . $layout . "</b>";

		foreach (self::$sections as $section) {
			if (is_callable($section)) {
				$html .= $section();
			}
		}

		$html .= "</div>";

		return $html;
	}
1040884
public function get_current_layout( $post = null ) {

		$override = $this->get_post_layout( $post );
		$layout   = ( $override ) ? $override : $this->get_global_layout();

		/**
		 * Filter the current layout.
		 *
		 * @since 1.0.0
		 *
		 * @param WP_Post|int|null $post
		 *
		 * @var string
		 */
		$layout = (string) apply_filters( 'rock_current_layout', $layout, $post );

		return $this->layout_exists( $layout ) ? $layout : $this->default;

	}
765974
public function getLayoutsForSelect()
    {
        if (!$this->_layoutsInitialized) {
            $this->_initLayouts();
        }

        $results = [];
        foreach ($this->_layouts as $layout) {
            $results[$layout->id()] = $layout->name();
        }

        return $results;
    }
565195
public function layout()
    {
        $this->data['layout']['content']  = 'grid-xs-12 order-xs-1 order-md-2';
        $this->data['layout']['sidebarLeft'] = 'grid-xs-12 grid-md-4 grid-lg-3 order-xs-2 order-md-1';
        $this->data['layout']['sidebarRight'] = 'grid-xs-12 grid-md-4 grid-lg-3 hidden-xs hidden-sm hidden-md order-md-3';

        $sidebarLeft = false;
        $sidebarRight = false;

        if (get_field('archive_' . sanitize_title(get_post_type()) . '_show_sidebar_navigation', 'option') && is_post_type_archive(get_post_type())) {
            $sidebarLeft = true;
        }

        //Has child or is parent and nav_sub is enabled
        if (get_field('nav_sub_enable', 'option') && is_singular() &&
            !empty(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A))
            || get_field('nav_sub_enable', 'option') && is_singular() &&
            count(get_children(['post_parent' => get_queried_object_id(), 'numberposts' => 1], ARRAY_A)) > 0) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('left-sidebar') || is_active_sidebar('left-sidebar-bottom')) {
            $sidebarLeft = true;
        }

        if (is_active_sidebar('right-sidebar')) {
            $sidebarRight = true;
        }

        if ($sidebarLeft && $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-6 order-xs-1 order-md-2';
        } elseif ($sidebarLeft || $sidebarRight) {
            $this->data['layout']['content']  = 'grid-xs-12 grid-md-8 grid-lg-9 order-xs-1 order-md-2';
        }

        if (!$sidebarLeft && $sidebarRight) {
            $this->data['layout']['sidebarLeft'] .= ' hidden-lg';
        }

        if (is_front_page()) {
            $this->data['layout']['content']  = 'grid-xs-12';
        }

        $this->data['layout'] = apply_filters('Municipio/Controller/BaseController/Layout', $this->data['layout'], $sidebarLeft, $sidebarRight);
    }
1373528
public function getLayout($url)
    {
        $engines = $this->getObject('template.engine.factory')->getFileTypes();
        $parts   = explode('.', $url);

        if(in_array(end($parts), $engines))
        {
            $type  =  array_pop($parts);
            $format = array_pop($parts);
        }
        else $format = array_pop($parts);

        return $this->getIdentifier(implode('.', $parts));
    }
1221452
public function display()
    {
        if (is_dir($this->getTemplate()->findPath($this->getLayout()))) {
            $this->setLayout($this->getLayout().'/default');
        }

        return parent::display();
    }
649767
public function getLayoutXml() {
        Varien_Profiler::start('turpentine::helper::esi::getLayoutXml');
        if (is_null($this->_layoutXml)) {
            if ($useCache = Mage::app()->useCache('layout')) {
                $cacheKey = $this->getFileLayoutUpdatesXmlCacheKey();
                $this->_layoutXml = simplexml_load_string(
                    Mage::app()->loadCache($cacheKey) );
            }
            // this check is redundant if the layout cache is disabled
            if ( ! $this->_layoutXml) {
                $this->_layoutXml = $this->_loadLayoutXml();
                if ($useCache) {
                    Mage::app()->saveCache($this->_layoutXml->asXML(),
                        $cacheKey, array('LAYOUT_GENERAL_CACHE_TAG'));
                }
            }
        }
        Varien_Profiler::stop('turpentine::helper::esi::getLayoutXml');
        return $this->_layoutXml;
    }
1151611
public function layout($compare = null)
    {
        if ($compare === null) {
            return $this->layoutName;
        }

        return $compare === $this->layoutName;
    }