craft3-templateselect icon indicating copy to clipboard operation
craft3-templateselect copied to clipboard

Use a separate template path.

Open ipetrov87 opened this issue 6 years ago • 0 comments

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:

project structure

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?

ipetrov87 avatar Jun 09 '18 08:06 ipetrov87