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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With