/**
* Add a hook to modify the template output
*
* @return string The template markup
*/
public function parse()
{
/** @var PageModel $objPage */
global $objPage;
// Adjust the output format
if ($objPage->outputFormat != '') {
$this->strFormat = $objPage->outputFormat;
}
$strBuffer = parent::parse();
// HOOK: add custom parse filters
if (isset($GLOBALS['TL_HOOKS']['parseFrontendTemplate']) && is_array($GLOBALS['TL_HOOKS']['parseFrontendTemplate'])) {
foreach ($GLOBALS['TL_HOOKS']['parseFrontendTemplate'] as $callback) {
$this->import($callback[0]);
$strBuffer = $this->{$callback[0]}->{$callback[1]}($strBuffer, $this->strTemplate);
}
}
return $strBuffer;
}