title: Meteor iron-router - Can I have multiple data sources in the route?
body: <p>I have an application built with Meteor that uses Iron Router. My layout uses multiple yield templates and I'd like to pass through different data to each one.</p>
  
  <p>It successfully passes through tasks to the tasksList template, but doesn't pass through selectedTask to the taskDetail template.</p>
  
  <p>Is it possible to have multiple data sources and is this the right way to go about it? And if yes, then why is it not working?</p>
  
  <p>Thanks in advance! :-)</p>
  
  <pre><code>Router.map(function() {
  this.route('tasksList', {
      path: '/',
      layoutTemplate: 'layout',
      template: 'tasksList',
      yieldTemplates: {
          'taskDetail': {to: 'rightTemplate'}
      },
      data: {
          tasks: function(){ return Tasks.find() },
          selectedTask: function() { return Tasks.findOne() }
      }
  });
  });
  
  &lt;template name="layout"&gt;
      &lt;section class="wrapper"&gt;
          &lt;div class="left-pane"&gt;
              {{yield}}
          &lt;/div&gt;
          &lt;div class="right-pane"&gt;
              {{yield 'rightTemplate'}}
          &lt;/div&gt;
      &lt;/section&gt;
  &lt;/template&gt;
  
  &lt;template name="tasksList"&gt;
      &lt;ul&gt;
          {{#each tasks}}
              &lt;li&gt;{{detail}}&lt;/li&gt;
          {{/each}}
      &lt;/ul&gt;
  &lt;/template&gt;
  
  &lt;template name="taskDetail"&gt;
      {{#each selectedTask}}
          &lt;div&gt;{{detail}}&lt;/div&gt;
      {{/each}}
  &lt;/template&gt;
  </code></pre>