So far I’ve seen template rendered from components in these four ways:
- Using the ~L sigil
- Having the template name same as the component’s but with the html.leex extension.
- Using Phoenix.View render/3 function
- Using render/2 macro which is the same as #3
I prefer not to use the ~L sigil for I like my templates in their own separate files.
In my component templates (#2) I have optional renderings of nested templates for which I’d like to be in the same folder as the component template, but with the approach in #3/4 it is required the templates be in the View’s template folder instead.
Is it possible to somehow render the nested templates from within the same folder as the component template that is rendering them?