I have a view with page display's page setting as following:

Path: some/path
Menu: No Menu

However it was overridden in templates by page--some--path.tpl.php for styling purposes. This tpl actually overrides page--some.tpl.php which is a base tpl for all pages located at some/* path.

I have now been asked to change this the path to some/path2. I did the same in views page settings. And created a tpl file page--some--path2.tpl.php.

Problem is that this tpl file is not getting detected and Drupal is using page--some.tpl.php as the template.

Why so?

  • Define that template in template.php
    – Manu
    Commented Dec 22, 2014 at 14:01
  • @Manu: How can I do that?
    – kmdhrm
    Commented Dec 22, 2014 at 14:10
  • 1
    Have you cleared the cache? Commented Dec 22, 2014 at 14:20

1 Answer 1


This is the snippet I wrote for region--login.tpl.php try this once. Hope it meets your requirements. in template.php

 function yourthemeName_theme() {
   $items = array();
  // create custom user-login.tpl.php
  $items['user_login'] = array(
  'render element' => 'form',
  'path' => drupal_get_path('theme', 'yourthemeName') . '/templates',
  'template' => 'region--login',
   'preprocess functions' => array(
   return $items;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.