title: How to render a Meteor Template from Collection of Template names?
body: <p>I have three simple Templates in Meteor, and a Collection on the server with any combination of their names. I want to be able to render these templates dynamically based on which of their names are in the Collection.</p>
  
  <p>Currently I am trying to accomplish this by using the client to subscribe to the Collection, and access the names through a template function. Unfortunately, if I try to run <em>">"</em> on the names, Meteor attempts to render the variable name instead of the Template pointed to by its value.</p>
  
  <p>So instead of rendering the html in <em>template1</em>, <em>template2</em>, and <em>template3</em>, the output is merely their names on the page: "template1 template2 template3".</p>
  
  <p>Here is the code I've been using, I hope there's a way to solve my issue without having to run Meteor.render manually.</p>
  
  <p>Server js:</p>
  
  <pre><code>TemplatesToRender = new Meteor.Collection("templatesToRender");
  
  TemplatesToRender.insert({templateName: "template3"});
  TemplatesToRender.insert({templateName: "template2"});
  </code></pre>
  
  <p>Client html:</p>
  
  <pre><code>&lt;body&gt;
      {{#each templatesToRender}}
          {{&gt; templateName}}           // meteor trying to render a template
                                       // called "templateName" instead of the 
                                       // variable inside templateName.
      {{/each}}
  &lt;/body&gt;
  
  &lt;template name="template1"&gt;
      &lt;span&gt;Template 1&lt;/span&gt;
  &lt;/template&gt;
  
  &lt;template name="template2"&gt;
      &lt;span&gt;Template 2&lt;/span&gt;
  &lt;/template&gt;
  
  &lt;template name="template3"&gt;
      &lt;span&gt;Template 3&lt;/span&gt;
  &lt;/template&gt;
  </code></pre>