Community Documentation

search-results.tpl.php

  1. drupal
    1. 6 search-results.tpl.php
    2. 7 search-results.tpl.php
    3. 8 search-results.tpl.php

search-results.tpl.php Default theme implementation for displaying search results.

This template collects each invocation of theme_search_result(). This and the child template are dependant to one another sharing the markup for definition lists.

Note that modules may implement their own search type and theme function completely bypassing this template.

Available variables:

  • $search_results: All results as it is rendered through search-result.tpl.php
  • $type: The type of search, e.g., "node" or "user".

See also

template_preprocess_search_results()

View source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

/**
 * @file search-results.tpl.php
 * Default theme implementation for displaying search results.
 *
 * This template collects each invocation of theme_search_result(). This and
 * the child template are dependant to one another sharing the markup for
 * definition lists.
 *
 * Note that modules may implement their own search type and theme function
 * completely bypassing this template.
 *
 * Available variables:
 * - $search_results: All results as it is rendered through
 *   search-result.tpl.php
 * - $type: The type of search, e.g., "node" or "user".
 *
 *
 * @see template_preprocess_search_results()
 */
?>
<dl class="search-results <?php print $type; ?>-results">
  <?php print $search_results; ?>
</dl>
<?php print $pager; ?>
Login or register to post comments