61 lines
2.2 KiB
PHP
61 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* @file
|
|
* Default theme implementation for displaying search results.
|
|
*
|
|
* This template collects each invocation of theme_search_result(). This and
|
|
* the child template are dependent to one another sharing the markup for
|
|
* definition lists.
|
|
*
|
|
* Note that modules and themes may implement their own search type and theme
|
|
* function completely bypassing this template.
|
|
*
|
|
* Available variables:
|
|
* - $result_count: Number of results.
|
|
* - $spellcheck: Possible spelling suggestions from Search spellcheck module.
|
|
* - $search_results: All results rendered as list items in a single HTML string.
|
|
* - $items: All results as it is rendered through search-result.tpl.php.
|
|
* - $search_performance: The number of results and how long the query took.
|
|
* - $sec: The number of seconds it took to run the query.
|
|
* - $pager: Row of control buttons for navigating between pages of results.
|
|
* - $index:
|
|
* - $keys: The keywords of the executed search.
|
|
* - $page_machine_name: Machine name of the current Search API Page.
|
|
*
|
|
* View Mode is set in the Search page settings. If you select
|
|
* "Themed as search results", then the child template will be used for
|
|
* theming the individual result. Any other view mode will bypass the
|
|
* child template.
|
|
*
|
|
* @see template_preprocess_search_api_page_results()
|
|
*/
|
|
|
|
?>
|
|
<?php //dsm($index, 'index'); ?>
|
|
<?php //dsm($items, 'items'); ?>
|
|
|
|
<?php if (!empty($result_count)) : ?>
|
|
<div class="materiobase-results <?php print ' view-mode-' . $variables['view_mode'];?>">
|
|
<?php if ($result_count) : ?>
|
|
<?php //print render($search_performance); ?>
|
|
<?php //print render($spellcheck); ?>
|
|
<div class="search-results">
|
|
<?php $eview = entity_view($index->item_type, $items, $variables['view_mode']); ?>
|
|
<?php //dsm($eview, 'eview'); ?>
|
|
<?php print render($eview); ?>
|
|
<?php
|
|
// foreach ($eview[$index->item_type] as $entity){
|
|
// $renders[] = render($entity);
|
|
// }
|
|
// dsm($renders, 'renders');
|
|
|
|
// print implode('<!-- whitespace -->', $renders);
|
|
?>
|
|
</div>
|
|
<?php print $pager; ?>
|
|
<?php else : ?>
|
|
<h2><?php print t('Your search yielded no results.');?></h2>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|