Style Drupal 7 log-in page

10,875

You can override any page template by naming your templates in the following convention:

For page 'user/login':

page--user--login.tpl.php

For page 'foo/bar/'

page--foo--bar.tpl.php

See Core templates and About overriding themable output for more information.

Remember to clear Drupal's caches once you add a new template file so the theme registry has a chance to pick the new file up.

Share:
10,875
Michiel
Author by

Michiel

Apple develover

Updated on June 09, 2022

Comments

  • Michiel
    Michiel almost 2 years

    How do I style the login-page of Drupal 7? I used different methods like page-user-login.tpl or user-login.tpl of page-login.tpl but with no results.

    Is there an easy way to theme your login page in Drupal 7 in his own .tpl-file?

  • Michiel
    Michiel over 12 years
    Got it, thanks!! A page--user.tpl.php is required though. And it's only working with page--user--login.tpl.php! But thanks!
  • Clive
    Clive over 12 years
    @Michiel: Sorry, I left out a dash, I've updated that in the answer. Check out this link as well it's the one I was originally looking for and explains all this very well
  • Michiel
    Michiel over 12 years
    Thanks for the additional link
  • Saeed Afzal
    Saeed Afzal over 5 years
    @Clive Thank you so much for the gerat help.