How to modify the drupal search templates?

蹲街弑〆低调 提交于 2019-12-11 07:51:00

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2068996/how-to-modify-the-drupal-search-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!