Hi,

While trying to override the user login form I am successful in other themes. For instance with the garland theme i add:

<?php
function garland_theme() {
 return array(
 'user_login' => array(
 'template' => 'user-login',
 'arguments' => array('form' => NULL),
 ),

 );
}

function ygarland_preprocess_user_login(&$variables) {
 $variables['intro_text'] = t('This is my awesome login form');
 $variables['rendered'] = drupal_render($variables['form']);
}

then i create user-login.tpl.php and add this:

<p><?php print $intro_text; ?></p>
  <?php print $rendered; ?>

When i try to attempt this with the basic theme (after renaming the theme and all subsequent instances of basic to nqc ) I simply am not getting the template file I should be.

Do you know what could be the issue?

Comments

bradallenfisher’s picture

OK, for anyone else out there who banged their head on this. You must either place the user-login.tpl.php file in the root of the theme (not in templates) or rewrite the location of the file in your template.php. Drupal will not find the file otherwise and theme.inc will yell at you.

damiankloip’s picture

Status: Active » Fixed

baf139 I think you have sorted your problem out self sufficiently! This can be closed I think.

see15_aug’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.