如何修改Drupal搜索模板? [英] How to modify the drupal search templates?

查看:103
本文介绍了如何修改Drupal搜索模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用drupal 6为搜索页面创建自己的模板.创建这些模板页面时,我通常使用 Drupal模板建议,但是由于某些原因在创建文件时:

I'm attempting to create my own templates for the search pages using drupal 6. When creating these template pages i usually use Drupal Template Suggests but for some reason when creating the files:

search-block-form.tpl.php search-result.tpl.php search-results.tpl.php search-theme-form.tpl.php

search-block-form.tpl.php search-result.tpl.php search-results.tpl.php search-theme-form.tpl.php

由于某种原因,它们似乎都没有覆盖Drupal模板吗?有什么特别的我需要输入或我可以测试的东西来查看它们是否正常工作,因为到目前为止我尝试过的所有方法都无法正常工作:/

None of them seem to override the Drupal templates for some reason? is there anything special that i have to put in or anything i can test to see if they are working as everything i've tried so far has failed to work :/

预先感谢

更新1

似乎它们现在可以工作了,我已经开始工作了:

Seems they work now i've got these working:

search-result.tpl.php search-results.tpl.php

search-result.tpl.php search-results.tpl.php

但是似乎我无法掌握控制表单的模板...是哪一个主意?

But it seems i can't get hold of the template that controls the form...any ideas which one that is?

推荐答案

search-theme-form.tpl.php:

search-theme-form.tpl.php: http://api.drupal.org/api/drupal/modules--search--search-theme-form.tpl.php/6

您可以使用预处理器来自定义某些表单: http://api. drupal.org/api/function/template_preprocess_search_theme_form/6

You can customize some of the form with the preprocessor: http://api.drupal.org/api/function/template_preprocess_search_theme_form/6

以下是使用预处理器的示例: http://agaric.com/note/theme-search-form-drupal-6

Here's an example of using the preprocessor: http://agaric.com/note/theme-search-form-drupal-6

这篇关于如何修改Drupal搜索模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆