Drupal 6 search box theming

In Drupal 6, the search box theming can be controlled in box.tpl.php. Here's an example.
<?php
/**
 * @file box.tpl.php
 *
 * Theme implementation to display a box.
 *
 * Available variables:
 * - $title: Box title.
 * - $content: Box content.
 *
 * @see template_preprocess()
 */
 
switch ($title) {
  case "Your search yielded no results": /* We have no results to display */
    $content = '<div id="my-search-content">' . "\n" . $content . "\n</div>\n";
  default: /* maintain the original box formatting so as not to disrupt the comments styling. */
    ?>
    <div class="box">
 
      <?php if ($title): ?>
        <h2 id="my-search-results-title"><?php print $title ?></h2>
      <?php endif; ?>
 
      <div class="content"><?php print $content ?></div>
    </div>
    <?php
    break;
}
?>

Tags

Article Type

General