0

On drupal 7, using webform 7.x-4.11, I am trying to modify the template of a specific webform.

So, in /web/themes/bartik/templates (I am using bartik theme) I created a file named webform-form-23.tpl.php

As "23" is the nid of my webform. But the template is not applying at all...

If a create a file webform-form.tpl.php it is well applying to all my webforms...

This is not a matter of caches as it is well applying when using a file named "webform-form.tpl.php" (with no ID) and despite of that the cache has been cleared at every changes.

Can someone help me on this one?

1 Answer 1

0

Have you made a clear cache in admin/config/development/performance?

Or have you looked if in the template there is a error in the code? To verify this you can try to copy all code of "webform-form.tpl.php" in your "webform-form-23.tpl.php" and at the top of the code, before the first TEST!!! , refresh the cache and look if TEST!!! is displayed. If you display TEST!!! in your previous code there is an error.

4
  • Sure! And the template is changing with no problems with a file with no ID (webform-form.tpl.php)
    – Fumble
    Commented Feb 19, 2016 at 13:07
  • @Fumble : good to know, I suggest you ADD that to your actual question also ... Commented Feb 19, 2016 at 13:10
  • Have you looked if in the template there is a error in the code? Try to copy all code of "webform-form.tpl.php" in your "webform-form-23.tpl.php" and at the top of the code, before the first <?php , add <h1>TEST!!!</H1> , refresh the cache and look if TEST!!! is displayed.
    – kb8
    Commented Feb 19, 2016 at 14:29
  • obviously it was an issue in the code inside the tpl file, it is working well now... Tank you!
    – Fumble
    Commented Feb 22, 2016 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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