Check parent page ID
PermalinkI am trying to include a different header.php file if the page resides in a certain section of the site. For example…
if parent page id = about {
$this->inc('elements/header_about.php');
} else {
$this->inc('elements/header.php');
}
Does anyone have any clues as to how I would go about doing this?
Thanks for any direction you can give.

$c = Page::getCurrentPage(); $parentPageID = $c->getCollectionParentID(); switch($parentPageID){ case 1: //do homepage stuff break; default: //do default stuff }