In my D7 template I have a tpl file called:
html--events.tpl.php
<html class="no-js" lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>"<?php print $rdf_namespaces; ?>>
<?php endif; ?>
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
</head>
<body<?php print $attributes;?>>
<a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
<?php print $page_top; ?>
<?php print $page; ?>
<?php print $page_bottom; ?>
</body>
</html>
I would like to add a page header image to this page by changing the template.
So therefore I would like to split the rendered content of this page for e.g. like this:
<?php print $page_top; ?>
<?php print $pageheader; ?>
<?php print "<div><img src='sites/default/files/animage.png'>/div>" ?>
<?php print $pagetitle; ?>
<?php print $pagemaincontnet; ?>
<?php print $page_bottom; ?>
However the var $page contains already all the rendered header. How can I split the rendered page into smaller blocks? I tried to replace:
<?php print $page; ?>
into
<?php print render($page['content']); ?>
but then got a message : Only variables can be passed by reference
Any suggestion is very welcome.