删除Drupal的搜索块“搜索此网站”标签。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了删除Drupal的搜索块“搜索此网站”标签。相关的知识,希望对你有一定的参考价值。

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

以上是关于删除Drupal的搜索块“搜索此网站”标签。的主要内容,如果未能解决你的问题,请参考以下文章

PHP 在Drupal 6中自定义块搜索表单

在Drupal7中以编程方式嵌入搜索块的最佳方法

在Drupal6中自定义块搜索表单

PHP Drupal提示:在视图块中删除嵌套的div

CSS 隐藏Drupal 6主题中的搜索表单标签

在Drupal6主题中隐藏搜索表单标签