Remove page headline for a given content type
To remove the page title (the one that prints in the page itself, not in the browser bar) for a specific node type, use this simple code in your template_preprocess_page() function.
Make sure you wrap the code that outputs the header in page.tpl.php in a conditional if statement, so that if there is no title it does not output the <h1></h1> tags.
This code goes in template.php of a theme named "example":
<?php
/**
* Override or insert variables into the page templates.
*
* @param $vars
* An array of variables to pass to the page theme template.
*/
function example_preprocess_page(&$vars) {
if (isset($vars['node']) && $vars['node']->type == 'credit') {
$vars['title'] = '';
}
}
?>
Search words:
page template conditional on node type
preprocess page template.php
More like this
- Remove the main content title from the front page of the site
- How to call the path to theme from within the theme (and why)
- There's more than one way to span a date...
- Different page templates for different content types
- RDFa for telephone, IRC links that open, and other spiffiness for Agaric's client support page

