Nesting closure templates within another template
-
21-12-2020 - |
Domanda
I'm sure there should be some way to render another template from within a template so I don't have to copy paste similar looking blocks. I'm just not able to figure it out.
Soluzione
I figured it out.
{call .templateName /}
Altri suggerimenti
If you need to pass parameters your can do it this way:
{template .teasersblock}
<div>
{call .teaser}
{param url: 'https://example.com' /}
{param headline: 'My headline example' /}
{/call}
</div>
{/template}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow