Answer the question
In order to leave comments, you need to log in
Drupal 7 login form theming?
I'm trying to themize the login form, which by default opens at the link /user/login/ I
did everything as described in this article.
Added code to template.php
function aihal_theme() {
$items = array();
$items['user_login'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'aihal') . '/templates',
'template' => 'user-login',
'preprocess functions' => array(
'aihal_preprocess_user_login'
),
);
return $items;
}
function aihal_preprocess_user_login(&$vars) {
$vars['intro_text'] = t('This is my awesome login form');
}
<p><?php print render($intro_text); ?></p>
<div class="aihal-user-login-form-wrapper">
<?php print drupal_render_children($form) ?>
</div>
Answer the question
In order to leave comments, you need to log in
Here, with a copy-paste of the code from the question, everything works:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question