tags:

views:

383

answers:

2

So I've gone and customized the user login/pass/register pages Drupal 6 and no problems. However I now do the same thing with the contact mail page (contact module enabled) and all I get is the contact form and NO theme. What am I doing wrong?

function mytheme_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-pass',
      'arguments' => array('form' => NULL),
    ),
    'contact_mail_page' => array(
      'template' => 'page-contact',
      'arguments' => array('form' => NULL),
    ),
  );
}
A: 

It looks like you are creating a module rather than a theme. With drupal6 you can extend an exsisting theme, negating the need for you to try and override the theme for each item.

Have a look at base theme in the theme .info file, and the documentation on creating your own theme

Jeremy French
+1  A: 

To theme a full page you shouldn't need to add that item into your code at all (in fact, it may be the reason you're not getting any theme - your item is conflicting with the default behaviour).

Presuming the url for your contact page is "http://www.your-site.com/contact", just create page-contact.tpl.php in your theme directory (..and clear the theme registry, gets me every time).

This goes for all pages - create a template based on page.tpl.php, and named after the url arguments. For example, page-taxonomy-term.tpl.php will be used to theme http://www.your-site.com/taxonomy/term.

Heather Gaye