The given PHP example helps you to returns the page object of the parent of the current page. Code Example:
<?php function get_parent_page() { global $post; $topParent = $post; while ($topParent->post_parent) { $topParent = $topParent->post_parent; } return get_page($topParent); } ?>