theme search results


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.