0
votes

Our drupal developer left company, so now I'm learning it )

If I open any page editor in admin panel, I see 'custom template' selectbox. In file structure I have some page-- and node-- files with similar names. For example in select box there is item 'Full width template'. And there are node--custom--fullwidth.tpl.php and page--custom--fullwidth.tpl.php in file structure.

So I need to create one more custom template but I can't find it in admin panel. How to do it, tell me please.

Thanx!

2
Did you try to copy your node--custom-fullwidth-tpl.php in your theme folder? Maybe it works - Mario Araque
I tried this first ) Cleaned cach also but no results! - Sergey Kudryashov

2 Answers

0
votes

I found it myself. Go to structure-content types-manage fields. There is a field - 'CUSTOM template'. There I need to add new one.

0
votes

Try to write this piece of code in your template.php file.

function yourthemename_preprocess_page(&$vars, $hook) {
    if (!empty($vars['node']) && !empty($vars['node']->type)) {
        $vars['theme_hook_suggestions'][] = 'page__node__' . $vars['node']->type;
    }
}

And then create the new custom template in side /sites/all/[theme]. And then clear the cache once.

I have tried it in Drupal 7.x and its working fine for me.