Quick and easy php snippet to have the page title not show on only certain node types.
Copy and paste the code below inside your template.php file.
<?php
function mythemename_preprocess_page(&$variables){
if($node = menu_get_object()){
if($node->type == 'my_node_type'){
$variables['title'] = '';
}
}
}
?>Works on Drupal 6
Where does this go?
An example of how you have implemented this on your page.tpl file will be handy.
The code goes in the /sites/themes/mytheme/template.php file.
This is for drupal 6.
You don't have to modify the page.tpl.php at all. The prepocess function can modify all the variables in the page.tpl.php before they are printed out.
Hope this helps.
Post new comment