自定义 Drupal 中搜索框的主题输出
我试图更改在 page.tpl.php 文件中打印 $search_box 时输出的 HTML。我了解在 drupal 中覆盖某些内容的过程,但我不知道如何为搜索框执行此操作。
这是我发现的唯一似乎相关的信息,但我不知道如何应用它来解决我的问题: http://api.drupalecommerce.org/api/function/search_form/6-4
I am trying to change the HTML that is output when I print $search_box in my page.tpl.php file. I understand the process of overriding something in drupal but I have no idea how to do it for the search box.
This is the only bit of information that I have found that seems related but I don't known how to apply it to solving my problem: http://api.drupalecommerce.org/api/function/search_form/6-4
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该检查位于modules/search 中的
search-block-form.tpl.php
和search-theme-form.tpl.php
,以及它们的预处理函数template_preprocess_search_block_form()
和template_preprocess_search_theme_form()
。您可能还对这篇文章以及从那里链接的页面感兴趣。
You should check
search-block-form.tpl.php
andsearch-theme-form.tpl.php
located in modules/search, as well as their preprocess functionstemplate_preprocess_search_block_form()
andtemplate_preprocess_search_theme_form()
.You might also be interested in this post and the pages linked from there.