1

I've created a template override for the user login form (user-login.tpl.php) and want to put some content before the form's elements (e.g, header text and copy). Anything you add in user-login.tpl.php become children elements of <form>. I want my supporting content outside the form structure.

Is there a template suggestion to get higher up in the processing chain or is this only possible using a specific preprocess hook in template.php or a module? Any examples would be greatly appreciated.

Thanks - Jeremy

1
  • an option might be to use the theme's page.tpl and include an if statement that checks for user/login - then include whatever markup you want within... – Geoff Oct 27 '14 at 23:15
0

Unless someone has a more elegant solution, I used:

$form['#prefix'] = '<h1>Header</h1>';

What seems odd here is the potential for a lot of markup in your code. I'm relatively new to Drupal, so I'm not sure if this is common practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.