Posted By

berkes on 02/01/10


Tagged

search drupal block theme wizzlern


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Onfire60
tronx
variantstudios


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


 / Published in: PHP
 

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

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

  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. }

Report this snippet  

You need to login to post a comment.