0

I have literally tried every combination possible, what am I missing?

page--user--login.tpl.php page--user.tpl.php page--login.tpl.php user--login.tpl.php page-user-login.tpl.php

1
  • Which version of drupal you are working on 7 or 6? Oct 22, 2013 at 16:59

2 Answers 2

1

page--user--login.tpl.php ... if you create one, make sure you flush your cache!

Also, check out this module: https://drupal.org/project/devel_themer

It'll help you determine these sorts of things, just don't leave it running after you're done development!

0

As per the template suggestion following will be the template file for user/login page:

page--user--login.tpl.php

However to use tme above template you may require the following template:

page--user.tpl.php

Also make sure you CLEAR THE CACHE after applying the changes.

Reference:
https://drupal.org/node/1195754


Alternatively if you want to define the custom suggestion for the user/login page than you can do it with the phptemplate_preprocess_page as following:

function phptemplate_preprocess_page(&$vars, $hook) {
  // Check to see that the user is not logged in and its correct page.
  if ($vars['user']->uid == 0 && arg(0) == 'user' && (arg(1) == '' || arg(1) == 'login')) {
    // Add suggestion for template-file "page--login.tpl.php" for user login page
    $vars['theme_hook_suggestions'][] = 'page__login';
  }
}

Now you can use page--login.tpl.php for the user/login page.

Your Answer

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

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