Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

page-content-type.tpl.php separate template for content type

17/04/2025, by Ivan

You've probably created custom templates for your nodes more than once, by overriding them with node-content-type.tpl.php.

Sometimes that’s enough, but other times you may need to define a specific page template for a content type. Unfortunately, in Drupal 6, this can’t be done without adding extra code. To enable custom templates like page-content-type.tpl.php, add the following code to your template.php file:

function phptemplate_preprocess_page(&$vars) {
  if (isset($vars['node'])) {
    $vars['template_files'][] = 'page-' . str_replace('_', '-', $vars['node']->type); 
  } 
}

Now you can create custom templates for your content types. For example, page-news.tpl.php (where news is the machine name of the news content type).

It’s also possible in Drupal to override taxonomy term output templates by adding the following function to template.php:

function phptemplate_preprocess_node(&$vars) {
  if (arg(0) == 'taxonomy') {
    $suggestions = array(
      'node-taxonomy'
    );
    $vars['template_files'] = array_merge($vars['template_files'], $suggestions);
  }
}

After that, you can override the template by placing a node-taxonomy.tpl.php file in your current theme folder.