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


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. /**
  2.  * remove label from search block. As per http://wizzlern.nl/drupal/zoek-door-deze-site-bij-zoekveld-verwijderen
  3.  */
  4. function phptemplate_preprocess_search_theme_form(&$vars) {
  5. // Remove search field title.
  6. unset($vars['form']['search_theme_form']['#title']);
  7.  
  8. // Render the altered form array.
  9. // Remove the #printed flag first to enable us to re-render the form.
  10. unset($vars['form']['search_theme_form']['#printed']);
  11. $vars['search']['search_theme_form'] = drupal_render($vars['form']['search_theme_form']);
  12. $vars['search_form'] = implode($vars['search']);
  13. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.