By samchok on
I'm using the search core module together with the search_config (http://drupal.org/project/search_config) module. The latter (also) adds possibility to exclude particular node types from the search.
Is it possible to have more than one search field/block per website?
I need to have a search field that only search for "news" content type, another one that only search for "associations" content type, and so on...
Thank you.
Comments
Try the Multiblock module.
Try the Multiblock module.
Thank you for your
Thank you for your suggestion.
I've created an instance of the "search form" block but I can't give it different settings because all the search setting (admin/settings/search) seems to be global.
Anyway, what I need to do is exactly what is already present in the drupal.org website: a search form is always present in the top-right corner of the website, but in the Modules page another search form is present and it only searches for modules.
That's exactly what I need to do.
Multiple Search fields for different Content Types
Multiple Search fields for different Content Types
We are going to create 2 php pages to hold our search forms.
The forms use a hidden input value giving us the functionality of only searching the "News" and "Assosciations" content types.
1. Uninstall Search Config or whatever that module is...
------- NEWS --------
2. Create a new blank PHP page and paste the following code:
3. Save it as site_searcher_news.php ( in the same directory as page.tpl.php )
4. Now open page.tpl.php and paste the following code:
------ ASSOCIATIONS --------
5. Create a new blank PHP page and paste the following code:
6. Save it as site_searcher_associations.php ( in the same directory as page.tpl.php )
4. Now open page.tpl.php and paste the following code:
Good Luck - [BD] BREAKING DEVELOPMENT