Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Custom Search

Security covered Maintenance fixes only 9,521 sites

This module enhances the default Drupal search functionality by allowing you to add advanced search options directly to the search box. You can configure which content types to search, choose specific search modules, and customize input types with various display options. It also offers advanced features like changing button text, using images, reordering elements, and integrating with other search systems.

This module alters the default search box in many ways. If you need to have options available like in advanced search, but directly in the search box, this module is for you.

D8.x notes

The 8.x-1.0-beta branch is usable, and instead of overriding the default search block like it did with D6/7, it provides its own block(s) (like the Custom Search Blocks submodule in previous versions, but easier to do now with D8 core). Settings for the results page are now set per search page, not global anymore. It still misses the upgrade path.

Basic options

The module adds options to select:

  • which content type(s) to search,
  • which specific module search to use (node, help, user or any module that implements search),
  • which input type to use (with Elements),
  • advanced criteria

For all these choices, there are options to switch between a select box, checkboxes or radio buttons, and also customize the selector label and the default - Any - text.

Advanced options

There are also options to:

  • change the default search box label,
  • add a default text in the search box,
  • add advanced search criteria,
  • change the default submit button text,
  • use an image instead of the submit button,
  • change the order of all the elements,
  • include some elements in a popup block,
  • add a filter to the results page,
  • show/hide basic and/or advanced search in the results page,
  • show/hide meta data in the results page,
  • multiple search paths

Included submodules

  • Custom Search Taxonomy: taxonomy options for the search block
  • Custom Search Blocks: provides additional search blocks, with different settings
  • Custom Search Internationalization: search content from all or current language only, and all label and selectors translation handling

Tutorial

See this video, made by OneStop.

Integration

Basic integration with:

Finally, there's some javascript to:

  • check if the search box is not empty on submit,
  • clear the default text on focus, and put it back on blur (if search box is empty),
  • handle checkboxes (deselect some checkbox if -Any-, or a special module search, is checked),
  • reselect options in the advanced search options (in results page).

This module is inspired by some modules that implements some of these options (search_config, search_type, custom_search_box).

Thanks to Tamarra Dull for the sponsor.

Ask your assistant about Custom Search

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Mar 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
8.x-1.0-beta9 Pre-release 8–10 Mar 21, 2023