Posted By

robksawyer on 05/13/09


Tagged

drupal


Versions (?)

theme search results


 / Published in: PHP
 

  1. function mytheme_preprocess_search_results(&$variables) {
  2. $variables['search_results'] = '';
  3. foreach ($variables['results'] as $result) {
  4. $variables['search_results'] .= theme('search_result', $result, $variables['type']);
  5. }
  6. $variables['pager'] = theme('pager', NULL, 10, 0);
  7. // Provide alternate search results template.
  8. $variables['template_files'][] = 'search-results-'. $variables['type'];
  9. }

Report this snippet  

You need to login to post a comment.