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

Triggered by Cms_Template
Author LemonStand eCommerce Inc.

Event handler signature

public Cms_Template event_onPrepareTemplateListData(Backend_Controller $controller)
$controller Backend_Controller the back-end controller object.
{return} Cms_Template configured CMS Layout object.
Allows to alter the list of layouts on the CMS/Layouts page in the Administration Area. The event handler accepts the back-end controller object and should return a configured Cms_Template object. The following example repeats the default functionality, and effectively does not change the layout list behavior.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onPrepareTemplateListData', $this, 'prepare_layout_list');
}

public function prepare_layout_list($controller) 
{
  $obj = Cms_Template::create();
  if (Cms_Theme::is_theming_enabled())
  {
    $theme = Cms_Theme::get_edit_theme();
    if ($theme)
      $obj->where('theme_id=?', $theme->id);
  }

  return $obj;
}