1

I have installed Custom Search module for my drupal7 setup.

I am trying to modify template files for search-result and search-results.

By default its using template files from contrib module's theme itself which are as follows:

sites/all/modules/contrib/custom_search/theme/custom_search-results.tpl.php
sites/all/modules/contrib/custom_search/theme/custom_search-result.tpl.php

As per the theme-debug's hook suggestions I have created tpl files and have placed them within my sub-theme's templates directory, which are as follows:

sites/all/themes/bootstrap_sub/templates/custom-search-result.tpl.php
sites/all/themes/bootstrap_sub/templates/custom-search-results.tpl.php

I have cleared cache for several times, and still it uses template files from the module's theme directory.

Can anyone please help me out with this issue.

Thanks in advance.

enter image description here

  • Your templates have all dashes whereas the module's templates have an underscore and a dash, e.g. custom_search-result.tpl.php (which seems odd) but I am guessing you need to copy these verbatim. – Danny Englander May 22 at 17:30
  • @danny-englander I have tried it, but it did not work. – Vik Durve May 26 at 10:53
  • 1
    Yes, I have cleared cache using both drush and from admin UI (/admin/config/development/performance) – Vik Durve May 27 at 11:47
  • 1
    This looks like it's a known issue, see this for more info with solutions. drupal.org/project/custom_search/issues/1162604 – Danny Englander May 28 at 11:54
  • 1
    @danny-englander had to use search-result.tpl.php – Vik Durve 2 days ago
0

This is a known issue with the Custom Search module for Drupal 7. Of note from the issue:

Copy custom_search/theme/custom_search-result.tpl.php to your theme location (e.g, sites/themes//templates/search-result.tpl.php), modify accordingly and then refresh your caches.

Tested on the current stable - custom_search 7.x-1.11

The solution is to rename custom_search-result.tpl.php from the module to search-result.tpl.php in your theme.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.