Determine page content based on page parent

$thispageid = get_the_ID();
$thispageparent = get_ancestors($thispageid);
if( in_array( 9, $thispageparent ) )
     echo do_shortcode(''); 
else
    the_content();

reference get_ancestors()