You can try this snippet to echo the page heading,
This can be used in your index.php file as well
$active = $menu->getActive();
if ($active) {
$pageHeading = $active->params->get('page_heading');
}
example
<?php if(!empty($pageHeading)): ?>
<div class="componentheading">
<?php echo $pageHeading; ?>
</div>
<?php endif; ?>