(How to) How to theme the search form for Drupal 6

How to : How to theme the search form for Drupal 6

Drupal is made to be customized; however some parts of Drupal theming don’t have much documentation written about them. Theming the search form is a good example. I don’t know if someone has added a tutorial in the last couple of months, but when I made the switch from Drupal 5 to Drupal 6 I couldn’t find a tutorial anywhere that explained how to do it, and the function that I had used for Drupal 5 was no longer working. So I tinkered with it a little, and after a bit of trial and error I came up with a method that works.

If you are updating your theme from Drupal 5 and you had a customized search form in that theme you should delete the theme function that called the search-theme-form.tpl.php file. The code in my old Drupal 5 themes looked like this:

function phptemplate_search_theme_form($form) {
/** 
* This snippet catches the default searchbox and looks for
* search-theme-form.tpl.php file in the same folder
* which has the new layout.
*/
return _phptemplate_callback('search-theme-form', array('form' => $form));
}

| Read More..

Courtesy:- pixelclever.com