Combining both search forms, hiding fields, changed labels & reducing node types

This module has five main functions.

  1. Alter the appearance of the core node search form
  2. Group content types for more meaningful searching
  3. Restrict search results by the content type.
    This is a role based restriction.
  4. Restrict search results from showing individual items.
    Use search_config 7.x-1.1-beta2 or above.
  5. Alter the pager limit (aka number search item results per page).
    Usesearch_config 7.x-1.1-beta1 or above.

Admin user (uid 1) is exempt from restrictions.

The first function of this module is to provide an easy interface to modify the search forms provided by core. These include some of the following options:

  • Removing the basic search form display if there is an advanced search form present
  • To move the basic keywords search field into the advanced form
  • Options to override the advanced forms fieldset. These include:
    1. Remove the collapsible wrapper and title
    2. Force it to stay open, but keep the open look and feel
    3. Expand initially, then collapsed during searches
    4. Expand initially or when there are zero results during searches
  • Label overrides provided for fields. These overrides are still translatable.
  • Title display settings for individual fields; above, hidden or below
  • Hiding or showing search fields completely or by role
  • To repopulate the advanced form fields after a search
  • Filter display options on the "Only of the type(s)" field
  • Custom content type groupings to make the types filter more UI friendly This allows you to specify options like:
    [] Standard pages (ie: page, book,etc)
    [] Personal blogging pages (ie: blog, forum, etc)
    [] All other pages (computed list not including page, book, blog or forum content types)

Some of these features can be mimicked using the Views module and making a view that replaces the standard search page. However, it would be difficult to completely mimic all of this modules functionality in a view.

If you require alternative search fields, then views may be your best option.

Modify search functionality by role.

For content types, the approach of this module is to re-write the search query, so that content is indexed and available as search results to users in role(s) that have permissions to view it, but not displayed to other roles.

This also updates the "Only of the type(s)" field options.

If you also require content restrictions, then the module that supplies that functionality should also update the search permissions, so this feature of this module does not need to be used.

It does not remove nodes from the search index.

Updating from 6.x

This should have all of the features of the Drupal 6.x, with the exception of the Category filter (because I can not find how to turn this on). However, a lot of new features have been added.

Note: This module was based on this article: Hiding content from Drupal's search system.

Versions 6.x and 5.x are no longer supported.

Sites using access control modules should use Drupal 7.8 or above to avoid invalid search queries.

The module is incompatible with AdaptiveTheme as this overrides the search form. Other themes or modules may do similar overrides.

Project Information

Downloads