custom_search-results.tpl.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation for displaying search results.
  5. *
  6. * This template collects each invocation of theme_search_result(). This and
  7. * the child template are dependent to one another sharing the markup for
  8. * definition lists.
  9. *
  10. * Note that modules may implement their own search type and theme function
  11. * completely bypassing this template.
  12. *
  13. * Available variables:
  14. * - $search_results: All results as it is rendered through
  15. * search-result.tpl.php
  16. * - $type: The type of search, e.g., "node" or "user".
  17. *
  18. *
  19. * @see template_preprocess_custom_search_results()
  20. */
  21. ?>
  22. <?php if ($search_results) : ?>
  23. <h2><?php print t('Search results');?></h2>
  24. <?php if (isset($filter) && $filter != '' && $filter_position == 'above') : ?>
  25. <div class="custom-search-filter">
  26. <?php print $filter; ?>
  27. </div>
  28. <?php endif; ?>
  29. <ol class="search-results <?php print $module; ?>-results">
  30. <?php print $search_results; ?>
  31. </ol>
  32. <?php if (isset($filter) && $filter != '' && $filter_position == 'below') : ?>
  33. <div class="custom-search-filter">
  34. <?php print $filter; ?>
  35. </div>
  36. <?php endif; ?>
  37. <?php print $pager; ?>
  38. <?php else : ?>
  39. <h2><?php print t('Your search yielded no results');?></h2>
  40. <?php print search_help('search#noresults', drupal_help_arg()); ?>
  41. <?php endif; ?>