3

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.

IsmailS
  • 10,797
  • 21
  • 82
  • 134

2 Answers2

6

I figured it out.

{call .templateName /}
IsmailS
  • 10,797
  • 21
  • 82
  • 134
  • 4
    If 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