I am trying to design a custom user registration form theme in a subtheme of drupal.
The name of the subtheme is unchanged.
In order to use my custom design, I updated the template.php file in "/sites/all/themes/adaptivetheme/adaptivetheme_subtheme". I added the following php snippet:
function adaptivetheme_subtheme_theme() {
return array(
'user_register' => array(
'arguments' => array('form' => NULL),
'template' => 'user-register',
),
);
}
Usually in other themes its working fine and I'm getting an error messages telling that the "user-register.tpl.php" file is missing.........but in adaptive theme, just after updating, the website is turning completely blank.
Then I created a user-register.tpl.php file and uploaded it in the same directory. I used the following code in the file:
drupal_set_title('Sign Up');
echo drupal_render($form);
It was supposed to show the default registration page with the heading "Sign Up".....But no result....still the same blank website.....
Please help.
Comments
Comment #1
Jeff Burnz commentedYou are missing one crucial step - adding the preprocess function to render variables for the template:
Use the following code:
In template.php add this...
Then add the template, this must be in the same directory as the template.php file, else you can add "path" to the theme() array (see the docs).
Here's the template code (user-register.tpl.php), to match the variables we set in the preprocess function:
Remember to clear the theme registry!
Comment #2
Aritra commentedTried hard......failed miserably. Somehow I cant manage to do it in adaptive theme. Results are same as before.
Is there any more solution?
Comment #3
Jeff Burnz commentedSorry but that is how its done. I can only think that you are either making a typo or not clearing the theme registry, or making some mistake that is small but crucial to making it work.
Comment #4
Jeff Burnz commented