theme able results

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy 2012-10-05 14:20:50 +02:00
parent 68126583b1
commit 476ccd94fe
3 changed files with 11 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
patch_commit_2030a6f810b1.patch

View File

@ -40,7 +40,7 @@
<?php if ($variables['view_mode'] == 'search_api_page_result') : // Uses child template. ?>
<?php print render($search_results); ?>
<? else : // All other view modes (Teaser, Full content, RSS and so forth). ?>
<?php else : // All other view modes (Teaser, Full content, RSS and so forth). ?>
<div class="search-results">
<?php print render(entity_view($index->item_type, $items, $variables['view_mode'])); ?>
</div>

View File

@ -46,6 +46,15 @@ function search_api_page_menu() {
}
}
$ret['results']['#theme'] = 'materiobase_results';
$ret['results']['#index'] = search_api_index_load($page->index_id);
$ret['results']['#results'] = $results;
$ret['results']['#view_mode'] = isset($page->options['view_mode']) ? $page->options['view_mode'] : 'search_api_page_result';
$ret['results']['#keys'] = $keys;
$ret['results']['#page_machine_name'] = $page->machine_name;
return $items;
}