As per title, I want to add an introduction text right after the Login / Register Form's title. Can anyone point me into the right direction on this?
Check out this guide: http://drupal.org/node/19855 . The relevant part, if you scroll down to the Drupal 7 section is adding your intro text variable like so:
<?php$variables['intro_text'] = t('This is my awesome login form');?>
Then in your template file you can print it out:
<p><?php print $intro_text; ?></p><div class="my-form-wrapper"> <?php print $rendered; ?></div>
Note that adding a template file for the registration form (which has no theme hook associated with it) requires an extra step. See the first step at http://www.beyrent.net/blog/2011/05/theming-drupal-7-user-registration-form
Hope that helps.
Thanks for replying.
This works if we login via user/login. On the same time, the site also have a login in Modal Form box. But the text did not shown there. Can someone point to me for this?
Hm... that's strange. The text shows for me in the modal as well as non-modal, so I'm not sure what to suggest.
Since this module just renders the form in a modal I don't see why wou wouldn't be able to just use a hook_form_alter() to add the extra markup you want.
Yes, using hook_form_alter() is probably the easiest way. Something like:
$form['some_text'] = array( '#type' => 'item', '#markup' => '<p>Some text</p>, '#weight' => -100, );
Drupal is a registered trademark of Dries Buytaert.