In Drupal, how do I override a template in a core module without modifying the actual core?
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.
精彩评论