theme_search_page

Versions
4.7 – 5
theme_search_page($results, $type)

Format the result page of a search query.

Modules may implement hook_search_page() in order to override this default function to display search results. In that case it is expected they provide their own themeable functions.

Parameters

$results All search result as returned by hook_search().

$type The type of item found, such as "user" or "node".

Related topics

Code

modules/search/search.module, line 1272

<?php
function theme_search_page($results, $type) {
  $output = '<dl class="search-results">';

  foreach ($results as $entry) {
    $output .= theme('search_item', $entry, $type);
  }
  $output .= '</dl>';
  $output .= theme('pager', NULL, 10, 0);

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.