Triggered before a page content is evaluated.
The event handler can return a string which will be used instead of the
standard page content. This event can be used for custom page
caching implementations.
If the default page content should be altered,
the handler should return an array containing the
page_content element
with a value corresponding the updated page content.
Usage example:
public function subscribeEvents()
{
Backend::$events->addEvent('cms:onBeforeEvalPageContent', $this, 'before_eval_page_content');
}
public function before_eval_page_content($params)
{
$page = $params['page'];
if ($page->url !== 'my-special-page')
return false;
return array(
'page_content'=>'Updated page content'
);
}