Sunday, July 22, 2012

Module - Search configuration


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.

No comments:

Post a Comment

only show translated menu items into current language (Drupal 8)

function MY_THEME_preprocess_menu(&$variables) {   if ($variables['menu_name'] == 'brancott-header-menu') {    $langu...