I´ve found numerous tutorials on how to do this on D6, BUT, it seems that the example code I´ve found doesn´t quite work on Omega subtheme.
Here´s the code I´ve found it suits me best (via Trellon):
Inside template.tpl.php:
<?php
function themename_theme($existing, $type, $theme, $path) {
return array(
...
// tell Drupal what template to use for the user register form
'user_register' => array(
'arguments' => array('form' => NULL),
'template' => 'user-register', // this is the name of the template
),
...
);
}
?>
And here´s the user-register.tpl.php form:
<div id="registration_form">
<div class="field">
<?php
print drupal_render($form['account']['name']); // prints the username field
?>
</div>
<div class="field">
<?php
print drupal_render($form['account']['pass']); // print the password field
?>
</div>
<div class="field">
<?php
print drupal_render($form['submit']); // print the submit button
?>
</div>
</div>
</div>
The thing is that inside my template.tpl.php file I´ve already declared mytheme_theme, so I don´t know how to add the new code.
Inside My omega subtheme folder:
/**
* Implementation of HOOK_theme().
*/
function lcph_theme(&$existing, $type, $theme, $path) {
$hooks = omega_theme($existing, $type, $theme, $path);
// Add your theme hooks like this:
/*
$hooks['hook_name_here'] = array( // Details go here );
*/
// @TODO: Needs detailed comments. Patches welcome!
return $hooks;
}
In fact, if I just copy/paste the code inside my template file, this is the error I´ve got:
Fatal error: Cannot redeclare lcph_theme() (previously declared in /sites/all/themes/lcph/template.php:22) in /sites/all/themes/lcph/template.php on line 125
How could I add the example code inside my omega subtheme template? Thanks for your guidance and help!
Rosamunda