Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Style Drupal 7 log-in page

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?

like image 992
Michiel Avatar asked Jan 03 '12 12:01

Michiel


People also ask

Is user logged in Drupal?

The function to use is called user_is_logged_in , and it can determine if a given user is logged in. For complete documentation on the function, click the appropriate link from the following, based on your Drupal version: Drupal 7 user_is_logged_in function information from drupal.org.


1 Answers

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.

like image 54
Clive Avatar answered Oct 14 '22 08:10

Clive