By dpizzle on
I following the tutorial for Customizing and Overriding User Login, Register and Password Reset in Drupal 6. I am using the zen theme and when I add the code written in http://drupal.org/node/350634 the new user-login.tpl.php is not being picked up. Can anyone help?
/**
* Registers overrides for various functions.
*
* In this case, overrides three user functions
*/
function zen_theme() {
return array(
'user_login' => array(
'template' => 'user-login',
'arguments' => array('form' => NULL),
),
'user_register' => array(
'template' => 'user-register',
'arguments' => array('form' => NULL),
),
'user_pass' => array(
'template' => 'user-login',
'arguments' => array('form' => NULL),
),
);
}
Comments
Simple way to do it
The way i did it was to write it manually, that way i could style it anyway i wanted. Here is what i have in my page.tpl.php. As you can see i have styled it with divs and classes. So you have to add the div and class in the style.css file if you want to style it.
I kinda like outputting every bit of drupal content manually, maybe someone has an easier solution but i found this way to be most perfect for me. And my login bar is unmatched without a doubt :) Totally awesome.
Thanks man
Outputting all drupal content sounds like a good plan. Thanks a lot.
useful stuff
ya now i got 100% source code control for theme, is the similar way support us to do for registration?
Most probably, you just need
Most probably, you just need to clear Drupal's cache. Go to /admin/settings/performance and click "Clear cached data" at the bottom of the page.
------------------------------------------------------------------------------------------------------------------------------------
Sergata - פיתוח תוכנה
another question
Hey guys,
Being able to customise the html on the page.tpl is a cool, but is there a way to override the html being outputted regardless to where the box is.
e.g. If I specify in block to have the login box on the left, for homepage right for another and bottom for another. How could i override the html the template outputs?
You are thinking of the user
You are thinking of the user login block ?
You theme it with adding
#block-user-0 {
float: right;
}
in your css file for example. Then the login block will be the same no matter where you print out the block.
If you need the login box to change position depending on page i would do like i do, wherer you put in the login code manually and surround it with different divs. One div for page.tpl.php and another for custompage.tpl.php for example.
But can I not get the
But can I not get the template.php to assign a tpl file for the html generated for user-login? so user-login.tpl.php controls what html is generated for all user-login regardless of the location specified in blocks and less code divs are used.