I've tried several times to get a page tpl php for a content type recognized by fusion theme, both core and starter, and cannot. I've used the code snippets for preprocess to get template.php to recognize the file as suggested on: https://www.drupal.org/node/1124036.

And followed the naming convention for the file. For example if the content type is called
interesting_content, I named the file page--interesting-content.tpl.php

If there is some way to do it that fusion will detect, please let me know.

Comments

j0e’s picture

Issue summary: View changes
Poieo’s picture

Status: Active » Closed (works as designed)

This is not a Fusion specific issue. Drupal core doesn't provide page templates for content types so you need to tell your theme about them. You can use the following in your template.php file inside your subtheme:

<?php
function yourthemename_preprocess_page(&$variables) {
  if (!empty($variables['node']) && !empty($variables['node']->type)) {
    $variables['theme_hook_suggestions'][] = 'page__node__' . $variables['node']->type;
  }
}
?>

Be sure to replace "yourthemename" with the machine name of your theme. Then, create a new page template with page--node--node_type.tpl.php. Be sure to clear your site's cache after adding the files.

This would apply to any theme and can be found here: https://www.drupal.org/node/249726

j0e’s picture

thanks so much... your code worked! much appreciated...