[support] Theme Override Erratic

Fred Jones fredthejonester at gmail.com
Sun Aug 24 13:27:30 UTC 2008


I have a simple theme override function in template.php:

function phptemplate_search_block_form($form) {
  $form['submit']['#theme'] = 'button';
  $form['submit']['#button_type'] = 'image';
  $form['submit']['#attributes'] = array(
    'src' => base_path() . path_to_theme() . '/images/search.jpg',
    'alt' => t('Search'),
  );
  return '<div class="container-inline">'. drupal_render($form) .'</div>';
}

and on most pages this works fine. On some pages, however, it seems
not to be used and the Search button is a regular HTML submit button.
I find that a bit perplexing. I go to a URL which is a View and it's
fine. I go to another page which is also a View and the theme function
is not used.

Any ideas what might be causing this? Using D5.9 (upgrading very soon to D5.10)

Thanks


More information about the support mailing list