Any one idea can help me?

Comments

bennos’s picture

You can only theme the view.

Out of the box views fastsearch does not display the result in a table as it typically views does.

itqn2004’s picture

I creat a node( form) for member post infomation. This fom have 5 field :
First name, Last name, state, city, zipcode.
I use zipcode field put search. And i have use modules view +view_Fastsearch put create a search form.
Search result not display beatifull.
I want search result display every cck field on a row. it's similar a table view.
I find code display field item oF view_Fastsearch:

function theme_views_fastsearch_display(&$view, &$items, $type) {
drupal_add_css(drupal_get_path('module', 'search') .'/search.css', 'module', 'all', FALSE);

if (isset($items) && is_array($items) && count($items)) {
// NOTE: using global to pass values from
// views_fastsearch_views_handler_search_index
global $_vfs_search_keys;
if (isset($_vfs_search_keys)) {
$keys = array();
foreach ($_vfs_search_keys as $value) {
$keys = array_merge($keys, $value);
}
$excerpt_keys = implode(' ', $keys);
}

$output = '
'. t('Search Results from 1 to 20 Record') .'

';
$output .= '

';
foreach ($items as $item) {
// Build the node body.
$node = node_load($item->nid);
$node = node_build_content($node, FALSE, FALSE);
$node->body = drupal_render($node->content);

// Fetch comments for snippet
$node->body .= module_invoke('comment', 'nodeapi', $node, 'update index');

// Fetch terms for snippet
$node->body .= module_invoke('taxonomy', 'nodeapi', $node, 'update index');

$extra = node_invoke_nodeapi($node, 'search result');
$entry = array(
'link' => url('node/'. $item->nid, NULL, NULL, TRUE),
'type' => node_get_types('name', $node),
'title' => $node->title,
'user' => theme('username', $node),
'date' => $node->changed,
'node' => $node,
'view' => $view,
'extra' => $extra,
'score' => $item->score,
'snippet' => search_excerpt($excerpt_keys, $node->body)
);
$output .= theme('views_fastsearch_item', $entry, $type);
}
$output .= '

';
return $output;
}
}

function theme_views_fastsearch_item($entry, $type) {
if (!empty($entry['score'])) {
$entry['extra'][] = 'score: '. round($entry['score'], 4);
}
return theme('search_item', $entry, $type);
}
Can display every field cck on a row?
please help me?

Status: Fixed » Closed (fixed)

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