title: Meteor data context, passing array into each Spacebars loop
body: <p>In this <a href="http://meteorcapture.com/spacebars/#template-inclusion-ex-2" rel="nofollow">Example 2</a> -- "<strong>Passing a data context</strong>" </p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>Template.overview.helpers({  
    users: [
      { name: 'David' },
      { name: 'Shaune' }
    ]
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;template name="overview"&gt;  
    {{&gt; userList users}}
  &lt;/template&gt;
  
  &lt;template name="userList"&gt;  
    {{#each this}}
      {{name}}&lt;br&gt;
    {{/each}}
  &lt;/template&gt;  
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <pre><code>David  
  Shaune 
  </code></pre>
  
  <p>My goal is to pass an array of template names into <code>Template.overview</code> where users is, like so: </p>
  
  <pre><code>&lt;template name="overview"&gt;  
    {{#each templateArray }}
      {{&gt; userList this }}
    {{/each}}
  &lt;/template&gt;
  </code></pre>
  
  <p>Where <code>templateArray</code> is an array of strings with template names, and <code>this</code> is the name of each template.</p>
  
  <p>Is this possible? </p>
  
  <p>EDIT: </p>
  
  <p>For more depth, consider that I have the following in my <code>helpers</code></p>
  
  <pre><code>Template.overview.helpers({  
    users: [
      { name: 'David' },
      { name: 'Shaune' }
    ],
    otherUsers: [
      { name: 'Jane' },
      { name: 'Betty' }
    ],
    moarUsers: [
      { name: 'Ben' },
      { name: 'Jerry' }
    ]
  });
  </code></pre>
  
  <p>And I'd like to pass each of these data context into the same template (in this case <code>userLists</code>).</p>