id === $nav->id){ return true; } else { // Check if Page is a Children from the Navpage $parents = $page->parents; foreach($parents as $parent){ if($parent->id === $nav->id && $parent->id != 1){ return true; } } } return false; } ?> isLoggedin()){ ?>