I followed https://www.drupal.org/node/350634#comment-10569550 tutorial

- I modified 'themes\bartik\template.php' adding function

function bartik_theme() {
$items = array();

$items['user_login'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'bartik') . '/templates',
'template' => 'user-login',
'preprocess functions' => array(
'bartik_preprocess_user_login'
)
...
return $items;
}

I created 'themes\bartik\templates\user-login.tpl.php' OR '\sites\all\theme\bartik\templates\user-login.tpl.php' OR ''\sites\all\themes\bartik\templates\user-login.tpl.php'

But it does not work. Nothing happens.

Comments

Jaypan’s picture

Did you clear your cache?

Sam Moore’s picture

Looks like you have copies of Bartik both in the /themes directory and in /sites/all/themes?
Thats definitely going to confuse the theme registry.
If I were you I'd create a subtheme of Bartik -see directions here: https://www.drupal.org/node/225125
Then you can put your new login template in the subtheme's templates directory.

As Jaypan mentioned, don't forget to clear your cache.

gosforth’s picture

Thank you guys!
One more question about templates; how to redirect user after register or login to some url?

edrupal’s picture

You could have a look at the Login Destination module. I've used for just that sort of thing.
Ed