processPageMarkup() public static method

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.
return string Returns the processed string.
Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }