Closed (fixed)
Project:
Basic
Version:
6.x-2.12
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2011 at 16:31 UTC
Updated:
7 Jul 2011 at 09:41 UTC
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
Comment #1
bradallenfisher commentedOK, 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.
Comment #2
damiankloip commentedbaf139 I think you have sorted your problem out self sufficiently! This can be closed I think.
Comment #3
see15_aug commented