Return to Snippet

Revision: 23180
at February 1, 2010 09:41 by berkes


Initial Code
/**
 * remove label from search block. As per  http://wizzlern.nl/drupal/zoek-door-deze-site-bij-zoekveld-verwijderen
 */
function phptemplate_preprocess_search_theme_form(&$vars) {
  // Remove search field title.
  unset($vars['form']['search_theme_form']['#title']);
 
  // Render the altered form array.
  // Remove the #printed flag first to enable us to re-render the form.
  unset($vars['form']['search_theme_form']['#printed']);
  $vars['search']['search_theme_form'] = drupal_render($vars['form']['search_theme_form']);
  $vars['search_form'] = implode($vars['search']);
}

Initial URL
http://wizzlern.nl/drupal/zoek-door-deze-site-bij-zoekveld-verwijderen

Initial Description
Wizzlern, a Dutch Drupal trainer, has a Dutch article online on how to remove the "search this site" label in the Drupal search-block.

Initial Title
Remove Drupal's search block "search this site" label.

Initial Tags
search, drupal, theme

Initial Language
PHP