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.
Asked
Active
Viewed 928 times
2 Answers
6
I figured it out.
{call .templateName /}

IsmailS
- 10,797
- 21
- 82
- 134
-
4If anyone else finds this topic in the future, here are all the features: http://code.google.com/p/closure-templates/source/browse/trunk/examples/features.soy – Amy B Sep 25 '11 at 12:57
0
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}

CommonSenseCode
- 23,522
- 33
- 131
- 186