Hi ,
I need to create custome page for node for which i have added below code inside my subtheme template.php
function md_make_subtheme_preprocess_page(&$variables) {
if (isset($variables['node']->type)) {
echo 'page__' . $variables['node']->type;
// If the content type's machine name is "my_machine_name" the file
// name will be "page--my-machine-name.tpl.php".
$variables['md_make_subtheme_hook_suggestions'][] = 'page__' . $variables['node']->type;
}
}
and inside my subtheme/templet/node new file created as page--bride_testimonial.tpl.php
But the new template file is not getting called. Am i missing any code lines.
Hi,
Please edit file name from page--bride_testimonial.tpl.php to page--bride-testimonial.tpl.php.
Placing file in subtheme/templet/node is ok. Please note that subtheme must be actived.
We checked and could see your structure of suggestion was wrong. Also, our Md Make theme has function Hook suggestion in theme for page content type already. You could take a look at file page.preprocess.inc (sites\all\themes\md_make\theme_setting\front ), line 23:
=> in subtheme, if you would like to create template for page of content type so please folloư file page--node--type--bride-testimonial.tpl.php that our developer created in folder sites/all/themes/md_make_subtheme/templates/page
Demo : /node/175