• Home
  • About Me
  • Contact Me
837 3750 ADS aix backup catalyst cisco cisco ios ftp hmc ibm ios juniper LDAP linux nas network nfs p-series password prestashop radius router sfu ssh steel belted tftp unix vpn windows
more tags
Home

Override the default Drupal 6 search form

Submitted by guvnor on Mon, 04/20/2009 - 09:06
  • drupal
  • search form

Customising the Drupal 6 Search Form

The default search form or box in drupal is good - it is simple enough and works. However it is not clear how to alter the look and feel and the default "Search this Site" label.
This article describes how to do this. It assumes your search box is in part of your theme.

Step 1. Copy a file called search-theme-form.tpl.php from the modules/search/ directory into your themes directory.

For example if your theme is called mytemplate you should copy the file to the this directory

sites/all/themes/mytemplate/search_theme_form.tpl.php

*Where path to your website is the path on the website where your drupal installation is kept.

Since I want to use an image for my "search" submit Button I have taken the output that the default searchbox produces and manually placed it into the file. This is what I placed in my search_theme_form.tpl.php:

Drupal Search

This has the effect of producing the outut of the drupal search function. Except as you are hardcoding the HTML you can customise it with CSS etc. This means you can make it look exactly as you wish. The search forum on this site is created in the way.

Tiaras Dog Harnesses