Closed ipetrov87 closed 6 months ago
This is now available with v5.0.0.
These are the different options now:
{{ entry.fieldHandle }}
{% include entry.fieldHandle %}
{% include entry.fieldHandle.withSubfolder() %}
This is a alias for the following:
{{ entry.templateWithSubfolder.template(true) }}
{{ entry.fieldHandle.subfolder() }}
{{ entry.fieldHandle.filename() }}
My idea is to make one matrix field with several components that can be used on many places. For that reason I want to have all my template, that are able to select, in one separated folder called components. In that folder I want to have sub-folders that contains all possible template for each component. Something like this:
So I add the template select field and set the sub-folder to component/textAndImage/. So when I go to my Homepage and select a template imageOnLeft.twig save it, and then I try to load the page I get this error:
Unable to find the template “imageOnLeft.twig” in "homepage/_entry" at line 5.
So instead to include component/textAndImage/imageOnLeft it just include imageOnLeft.twig.
Is it possible somehow to include the Limit to subfolder + Selected template instead just Selected template?