1

I needed to modify a module's .tpl file and so copied it, renamed it to something suggested by Theme Debug's file suggestions.

Eg when I run drush theme_debug I see:

<!-- FILE NAME SUGGESTIONS:
   * image-resp-item--f6.tpl.php
   x image-resp-item.tpl.php
-->

So I rename my new file image-resp-item--f6.tpl.php and place it in my site's theme.

I clear cache and rebuild the theme registry but to no affect - the site still uses the original .tpl.

To experiment, I change my new .tpl's name to match the old one (remove --f6). This works - I see my new code appear on the site.

Why is my site (or theme?) not wanting to use the suggested file name?

| improve this question | | | | |
0

Your can either use hook_preprocess_page or if you don't want to code use something like context module. You can add a new context to select theme template based on your requirement.

| improve this answer | | | | |
  • So I would have to write a code to include each modified .tpl file? I thought that was the point of theme suggestions - to automate this? – MeltingDog Mar 15 '17 at 4:08

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.