Custom Templates: "_row.twig could not be found" #1658
-
What happened?In the middle of updating from 4.x to 5.x, I already did migration and am now in the process of transforming my templates. I've followed the docs for creating custom templates by copying the bootstrap-5 index.twig into my custom template file. I tried changing the import on the first error, that didn't work. Errors and Stack Trace (if available)The template “@freeform-formatting-templates/bootstrap-5/_row.twig” could not be found in “__string_template__3bf363610c5199ee9fa1577b3b758587” at line 9.
The template “freeform/_templates/formatting/bootstrap-5/_row.twig” could not be found in “__string_template__3bf363610c5199ee9fa1577b3b758587” at line 9. How can we reproduce this?
Freeform EditionPro Freeform Version5.6.8 Craft Version4.12.9 When did this issue start?After upgrading from older Freeform version Previous Freeform Version4.2.7 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @Larsundso, Can you share what your overall template structure looks like for this custom formatting template? I'm curious about where each file (including To be clear, all of your associated files should be placed within your
It's also possible that there's a conflict with naming the custom formatting template as |
Beta Was this translation helpful? Give feedback.
-
Hi back @kjmartens,
So i only have a "My-Template.twig" with the contents of this template samples index.twig. |
Beta Was this translation helpful? Give feedback.
-
The problem is that the Bootstrap 5 template code example in the docs includes more than just 1 file. It includes a folder and several files within it. That's why it won't work if you attempt to just copy the main index.twig file code into a single template -- it's missing the other template files that need to be created. 🙂 |
Beta Was this translation helpful? Give feedback.
Hi @Larsundso,
Can you share what your overall template structure looks like for this custom formatting template? I'm curious about where each file (including
_row.twig
) is located in your setup.To be clear, all of your associated files should be placed within your
bootstrap-5
template directory, e.g./my-custom-template/
index.twig
_row.twig
fields/
default.twig
checkbox.twig
It's also possible that there's a conflict with naming the custom formatting template as
bootstrap-5
as well, so if the issue continues, please try naming it something different. 🙂