Hi;

I am trying to configure my theme template.php and search-result.tpl.php files to display thumbnails in search results above the snippet. So far I have been able to produce the node images in the search result using the following:

In template.php......

* Search result preprocessing
*/

function fusion_core_preprocess_search_result(&$vars) {
static $search_zebra = 'even';

$search_zebra = ($search_zebra == 'even') ? 'odd' : 'even';
$vars['search_zebra'] = $search_zebra;
$result = $vars['result'];
$vars['image'] = $result['node']->content['image']['#value'];
$vars['url'] = check_url($result['link']);

In search-result.tpl.php......

* @see template_preprocess_search_result()
*/
?>

print $url; "> print $title; print $image;
if ($snippet) :

print $snippet;

endif;
if ($info) :

print $info;

endif;

However I would like to produce thumbnails of the node images and would like to do it without using image cache if possible because of php conflicts with my Apache server. I can't seem to determine what the variable would be for the tumbnails. Any assitance is most appreciated.

I am currently using Drupal 6.17

Comments

asad.hasan’s picture

$result["node"] contains the node in search-result.tpl.php

ceci123’s picture

My search-result.tpl.php located under sites/all/themes/sttheme/fusion_core is not working at all. Did you do anything special to make the search-result.tpl.php work?

Thanks