Style Drupal 7 log-in page

Michiel picture Michiel · Jan 3, 2012 · Viewed 10.9k times · Source

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?

Answer

Clive picture Clive · Jan 3, 2012

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.