There are countless requests for this in the forum and till now there is no real good solution. Here is my way of doing it . .

Before going in to the details, let me tell you the benefit of using it : Its just not good looking and gives the easy option to search but its fast, really fast.
Modules required:
1.Core Search Module
2.Fast Search
3.Views
4.JS with TABS
First decide which option you want the user to search with, the best two are
a. Categories
b. Content Type
In My example I have used following Taxonomy Vocabulary Name.
. site
. artists
. image
. bands
. gigs
. music
Where Site is for all the vocabularies.
Overview:
1. Install all the modules.
2. Go to views and create views for all the categories with search option.

a. Name: name of the view
b. Description : Only for your reference
c. Enable "Provide a page view"
d. Write the url
e. Select View Type : Search Result
f. Enable Use Pager
g. Nodes per page 10/20 (anything you wish)

h. Add only one field Search Score
i. Select the Filters as shown in the pic.
j. Instead of Vocabulary name you can use any other filtering criteria Like content type, specific terms etc.
k.Expose Only one filter Search: Fast Index
l. Search criteria should be search: score descending
3. Repeat the above step 2 for all you different tab elements.
4.Now create a block at the header for showing the search (I guess none of the available module provides any such block, so create on your own.
a.To show all the search views in tabs. Use the following code
$search_image = views_get_view('search_image');
$search_all = views_get_view('search_all');
$search_artists = views_get_view('search_artists');
$search_bands = views_get_view('search_bands');
$search_music = views_get_view('search_music');
$search_gigs = views_get_view('search_gigs');
$form = array();
$form['search'] = array(
'#type' => 'tabset',
'#title' => t('Search Categories'),
);
$form['search']['artists'] = array(
'#type' => 'tabpage',
'#title' => t('artists'),
'#content' => views_build_view('embed', $search_artists, array(), false, false),
);
$form['search']['all'] = array(
'#type' => 'tabpage',
'#title' => t('site'),
'#content' => views_build_view('embed', $search_all, array(), false, false),
);
$form['search']['image'] = array(
'#type' => 'tabpage',
'#title' => t('image'),
'#content' => views_build_view('embed', $search_image, array(), false, false),
);
$form['search']['tab4'] = array(
'#type' => 'tabpage',
'#title' => t('bands'),
'#content' => views_build_view('embed', $search_bands, array(), false, false),
);
$form['search']['tab5'] = array(
'#type' => 'tabpage',
'#title' => t('music'),
'#content' => views_build_view('embed', $search_music, array(), false, false),
);
$form['search']['tab6'] = array(
'#type' => 'tabpage',
'#title' => t('gigs'),
'#content' => views_build_view('embed', $search_gigs, array(), false, false),
);
return tabs_render($form);
?>
b. enable the block .
Nice work. .this is exactly
Nice work. .this is exactly what i was looking for.
can you show some working examples. .
i would like to see that before trying this
I did the above hack as per
I did the above hack as per the requirement of one project and the demo is available @ http://www.nishitdas.com/testing. . but it wont be their for long
Post new comment