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

Triggered by Cms_Partial
Author LemonStand eCommerce Inc.

Event handler signature

public array event_onGetPartialContent(array $data)
$data array specifies a list of input parameters.
{return} array returns an array containing the content element.
Allows modify a partial's content. The event handler should accepts an array of parameters with the following keys: The event handler should return an array with at least a single element content containing the updated content.
public function subscribeEvents() 
{
  Backend::$events->addEvent('cms:onGetPartialContent', $this, 'get_partial_content');
}

public function get_partial_content($data) 
{
  $data['content'] = str_replace('NAME', 'OUR STORE NAME', $data['content']);

  if($data['file_based'])
    $data['content'] .= '<br>CMS partial file: '.$data['file_name'];

  $data['content'] .= '<br>CMS partial name: '.$data['name'];

  return $data;
}