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

Triggered by Cms_Page
Author LemonStand eCommerce Inc.

Event handler signature

public boolean event_onGetPageNavigationVisibility(mixed $page)
$page mixed specifies the CMS page object (stdClass).
{return} boolean returns FALSE if the page should not be visible and TRUE if the page should be visible.
Allows to hide a page from automatically generated menus and site maps. The handler function should return FALSE if the page should not be visible and TRUE if it should be visible. If the event is handled by different modules, a page would not be visible if any handler returned FALSE. The event handler should accept a single argument - the page object (stdClass). The object has the following properties:
  • id - specifies the page identifier
  • title - specifies the page title
  • parent_id - specifies the page parent identifier
  • url - specifies the page URL
  • navigation_label - specifies the page navigation label
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onGetPageNavigationVisibility', $this, 'eval_page_visibility');
}

public function eval_page_visibility($page)
{
  return $page->url != '/hidden_page';
}