如何修改drupal搜索模板?
我正在尝试使用 drupal 6 为搜索页面创建自己的模板。创建这些模板页面时,我通常使用 Drupal 模板建议,但在创建文件时由于某种原因:
search-block-form.tpl.php 搜索结果.tpl.php 搜索结果.tpl.php search-theme-form.tpl.php
由于某种原因,它们似乎都没有覆盖 Drupal 模板?有什么特别的东西我必须放入或任何我可以测试的东西来看看它们是否工作,因为到目前为止我尝试过的所有东西都无法工作:/
提前感谢
更新1
似乎他们工作现在我已经开始工作了:
search-result.tpl.php search-results.tpl.php
但似乎我无法掌握控制表单的模板...有什么想法吗?
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
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 :/
Thanks in advance
UPDATE 1
Seems they work now i've got these working:
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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
以下是使用预处理器的示例: http://agaric.com/note /主题-搜索-表单-drupal-6
search-theme-form.tpl.php: http://api.drupal.org/api/drupal/modules--search--search-theme-form.tpl.php/6
You can customize some of the form with the preprocessor: http://api.drupal.org/api/function/template_preprocess_search_theme_form/6
Here's an example of using the preprocessor: http://agaric.com/note/theme-search-form-drupal-6
刷新浏览器后,将其放置到当前主题文件夹中。如果您启用缓存,可能需要清除缓存。
请在此处查看这些文件的内部描述: http://api.drupal.org/api/搜索/6/搜索
Place it to your current theme folder, after refresh browser. May be clearing cache required, if you enable caching.
See internal descriptions of these files here: http://api.drupal.org/api/search/6/search