function template_preprocess_search_results in Drupal 6
Same name and namespace in other branches
- 7 modules/search/search.pages.inc \template_preprocess_search_results()
Process variables for search-results.tpl.php.
The $variables array contains the following arguments:
- $results
- $type
See also
File
- modules/
search/ search.pages.inc, line 60 - User page callbacks for the search module.
Code
function template_preprocess_search_results(&$variables) {
$variables['search_results'] = '';
foreach ($variables['results'] as $result) {
$variables['search_results'] .= theme('search_result', $result, $variables['type']);
}
$variables['pager'] = theme('pager', NULL, 10, 0);
// Provide alternate search results template.
$variables['template_files'][] = 'search-results-' . $variables['type'];
}