Hi,
in case of getting more results than 1 I want to get only result-snippets instead of showing the complete nodes.

What can I do to get snippets shown?

Comments

danielb’s picture

Currently it is set to show Node Teasers - so perhaps just changing how your node teasers work would solve your problem.

If you would like to change the output of the results page anyway:

Grab this theme function

function theme_finder_wizard_form_results_page($results, $form_state) {

  $limit = 10;
  $quantity = count($results);
  $nids = array_keys((array)$results);
  $finder_wizard = &$form_state['storage']['finder_wizard'];

  if (empty($nids)) {
    $output .= t('There are no results to display.');
  }
  else {
    foreach ($nids as $nid) {
      $result = node_load($nid);
      $output .= node_view($result, TRUE);
    }
  }

  if (is_numeric($limit) && $limit > 0) {
    $output .= theme('pager', null, $limit, 0, array(), $quantity);
  }

  return $output;

}

And put it in your template.php of your theme. Change the name of the function from ' theme_finder_wizard_form_results_page' to 'YOUR-THEME_finder_wizard_form_results_page' where YOUR-THEME is your theme.

Now change the PHP to suit your needs.

danielb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.