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:onEvaluateCode event

Triggered by Cms_Controller
Author LemonStand eCommerce Inc.

Event handler signature

public mixed event_onEvaluateCode(array $params)
$params array an array of parameters.
{return} mixed returns an array with content element or NULL.
Triggered before PHP code on a page, partial or layout code is evaluated. The event is triggered for all fields which support PHP, including page Pre and Post action codes, code blocks, AJAX event handlers, etc. The event handler should accept the array which contains the following elements:
  • page - specifies a page (Cms_Page) the code is being evaluated for.
  • controller - specifies the controller (Cms_Controller) object.
  • params - an array of PHP variables available in the code.
  • code - specifies the PHP code to evaluate.
  • object_type - specifies the CMS object type. Possible values are: CMS page, CMS template, CMS partial, CMS page block, CMS page head.
  • object_name - specifies the CMS object name.
The handler can return an array with the single element content. In this case LemonStand will use the returned value instead of evaluating the PHP code.