Skip to content

Instantly share code, notes, and snippets.

@KorvinSzanto
Forked from kellyelton/global_area.php
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KorvinSzanto/78065327a6782ae3a95d to your computer and use it in GitHub Desktop.
Save KorvinSzanto/78065327a6782ae3a95d to your computer and use it in GitHub Desktop.
public function display() {
$page = Page::getCurrentPage();
if(!$page->cID) {
$page = Page::getByPath("/page_not_found");
if(!$page->cID) {
$page = Page::getByID("/some_new_page");
}
}
parent::getOrCreate($page, $this->arHandle, 1);
parent::display($page);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment