Parses the static page markup and renders snippets defined on the page.
public static processPageMarkup ( string $pageName, Cms\Classes\Theme $theme, string $markup ) : string | ||
$pageName | string | Specifies the static page file name (the name of the corresponding content block file). |
$theme | Cms\Classes\Theme | Specifies a parent theme. |
$markup | string | Specifies the markup string to process. |
Résultat | string | Returns the processed string. |
public function getProcessedPlaceholderMarkup($placeholderName, $placeholderContents) { if (array_key_exists($placeholderName, $this->processedBlockMarkupCache)) { return $this->processedBlockMarkupCache[$placeholderName]; } $markup = Snippet::processPageMarkup($this->getFileName() . md5($placeholderName), $this->theme, $placeholderContents); return $this->processedBlockMarkupCache[$placeholderName] = $markup; }
public function getProcessedPlaceholderMarkup($placeholderName, $placeholderContents) { if (array_key_exists($placeholderName, $this->processedBlockMarkupCache)) { return $this->processedBlockMarkupCache[$placeholderName]; } /* * Process snippets */ $markup = Snippet::processPageMarkup($this->getFileName() . md5($placeholderName), $this->theme, $placeholderContents); /* * Inject global view variables */ $globalVars = ViewHelper::getGlobalVars(); if (!empty($globalVars)) { $markup = TextParser::parse($markup, $globalVars); } return $this->processedBlockMarkupCache[$placeholderName] = $markup; }