This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

cms:onBeforeEvalPageContent event

Triggered by Cms_Controller
Author LemonStand eCommerce Inc.

Event handler signature

public mixed event_onBeforeEvalPageContent(array $params)
$params array an array with the page element representing a page object.
{return} mixed returns an array containing the page_content element or FALSE.
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'
  );
}