开发者

In Drupal, how do I override a template in a core module without modifying the actual core?

开发者 https://www.devze.com 2023-02-19 15:13 出处:网络
I want to edit the search results of a search using the search module. The template in question is search-result.tpl.php. I see that it\'s in html/modules/search, but I\'d like tokeep the modification

I want to edit the search results of a search using the search module. The template in question is search-result.tpl.php. I see that it's in html/modules/search, but I'd like to keep the modification ou开发者_开发百科t of the core and keep it in my sites folder. Is there a way to change the place that drupal looks for that specific template? If not, how can I accomplish my goal?


Copy the search-result.tpl.php into your theme's directory, modify it as needed, and clear the theme cache.

You may also want to check out the About overriding themable output handbook page for additional details.

0

精彩评论

暂无评论...
验证码 换一张
取 消