Variable to check if the page is of some other Content Type
Place this in your theme's template.php, replacing 'THEMENAME' with the name of your theme:

function THEMENAME_preprocess_page(&amp;$variables, $hook) {
  $variables['some_html'] = '';
  if (isset($variables['node']) &amp;&amp; $variables['node']-&gt;type == 'product') {
    $variables['some_html'] = '&lt;p&gt;Hello world!&lt;/p&gt;';
  }
}


And use this in your page.tpl.php:

&lt;?php print $some_html; ?&gt;


Alternatively, if you want to keep the HTML string in your template file, I would do this in template.php:

function THEMENAME_preprocess_page(&amp;$variables, $hook) {
  $variables['print_extra_header'] = false;
  if (isset($variables['node']) &amp;&amp; $variables['node']-&gt;type == 'product') {
    $variables['print_extra_header'] = true;
  }
}


And use this in page.tpl.php:

&lt;?php if ($print_extra_header) : ?&gt; &lt;h1&gt;THIS GETS PRINTED&lt;/h1&gt; &lt;?php endif; ?&gt;


Make sure to clear the cache after creating the THEMENAME_preprocess_page function, otherwise Drupal will not know it's there and it will not run.