title: Meteor: How to return a Template from a Template Helper?
body: <p>n00b here. I'm trying to "inject" an arbitrary template into another. But it seems like I'm doing it wrong :) </p>
  
  <p>whatever.html:</p>
  
  <pre><code>&lt;template name="parent"&gt;
      {{child}}
  &lt;/template&gt;
  
  &lt;template name="child1"&gt;
    I'm child 1
  &lt;/template&gt;
  
  &lt;template name="child2"&gt;
    I'm child 2
  &lt;/template&gt;
  </code></pre>
  
  <p>whatever.coffee</p>
  
  <pre><code>x = "child1"
  Template.parent.child = -&gt; Template[x](@)
  </code></pre>
  
  <p>This will create "annotated HTML" (<a href="http://docs.meteor.com/#template_call" rel="nofollow">http://docs.meteor.com/#template_call</a>) as the result, but the output of the {{child}} helper is html-encoded and thus is not interpreted. </p>
  
  <p>I'm aware that I could use the Template.myTemplate.rendered event to add the template directly to the DOM using jQuery. But that seems like quite a hack imho. I'd rather have a helper generate that if possible. </p>
  
  <p>What is the "right" way to do this? Is it possible to unescape the result in the template? Will reactivity work? </p>
  
  <p>Thanks in advance!!1</p>
  
  <p>Regards</p>