Ginger Opariti
Ginger Opariti

Reputation: 1292

Override custom content page markup Drupal 7

Although I've seen some 'clean' answers on this topic here, it still doesn't work in my case, which is the following: being in Drupal 7 with a completely customized theme, I have created a custom content with the machine name cco_product. I want to override the page markup for the page generated for this content type. I have tried, as per the documentation, page--cco_product.tpl.php in the tmemes folder, based on /module/system/page.tpl.php, but my Hello world on top of this file doesn't show up. Thanks for help

Upvotes: 0

Views: 456

Answers (1)

Sergey Litvinenko
Sergey Litvinenko

Reputation: 593

First, try clean your cache, if did't help, i can advise to look into the an array of templates for your page. Maybe one of your modules or your custom theme overrides array of templates like this:

function MYTHEME_preprocess_page(&$variables, $hook) {   
   //Add multiple suggestions for pages based on Node
   if(arg(1) == 3) {  //For node 3
    $variables['theme_hook_suggestions'][] =  'page__contact';
   } if(arg(1) == 4) {   //For node 4
    $variables['theme_hook_suggestions'][] =  'page__about';
   }
}

Upvotes: 1

Related Questions