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';
}