search-results.tpl.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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. * - $module: The machine-readable name of the module (tab) being searched, such
  17. * as "node" or "user".
  18. *
  19. *
  20. * @see template_preprocess_search_results()
  21. *
  22. * @ingroup themeable
  23. */
  24. ?>
  25. <?php if ($search_results): ?>
  26. <h2><?php print t('Search results');?></h2>
  27. <ol class="search-results <?php print $module; ?>-results">
  28. <?php print $search_results; ?>
  29. </ol>
  30. <?php print $pager; ?>
  31. <?php else : ?>
  32. <h2><?php print t('Your search yielded no results');?></h2>
  33. <?php print search_help('search#noresults', drupal_help_arg()); ?>
  34. <?php endif; ?>