title: Passing variable from parent template to child template in meteor
body: <p>I have a parent template with several nested child templates inside it. And inside each nested template I have a string generated from an array. A simplified model of my html:</p>
  
  <pre><code>&lt;template name="parent"&gt;
     &lt;a class="logId"&gt;Console log parent Id&lt;/a&gt;
     {{&gt; firstChild}}
     {{&gt; secondChild}}
  &lt;/template&gt;
  </code></pre>
  
  <p>In addition my child templates have an each loop like this:</p>
  
  <pre><code>&lt;template name="firstChild"&gt;
     {{#each users}}
        {{this}}
        {{&gt; adminSelectUser}}
     {{/each}}
  &lt;/template&gt;
  
  &lt;template name="adminSelectUser"&gt;
     &lt;a class="selectUser"&gt;SelectUser&lt;/a&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>In my js code:</p>
  
  <pre><code>Template.parent.events({
      'click .logId': function () {
         var eventId = this._id._str;
         console.log(eventId);
  });
  
  Template.adminSelectUser.events({
     'click .selectUser': function(template){
        var userString = this.valueOf();
        console.log(userString);
      }
   });
  </code></pre>
  
  <p>To this point I get it to work and in both of my templates I can find the id of my parent and the string of my user as I want it to do. But then I would also want to use both my variables eventId and userString in the same method call, called from the template adminSelectUser. Is there any way that I can pass the eventId found in the parent template down to the adminSelectUser template so that I can work with both variables with the same method call. </p>
  
  <p>This is what I aim to do with my server methods:</p>
  
  <pre><code>Meteor.methods({
      removeUser: function(){
         Meets.update({_id: eventId}, {$pull : {usersApplied: userString}});
    }
  }); 
  </code></pre>
  
  <p>I want my server method to recognize the eventId and the userString and get them to work together when I call the method later on in the adminSelectUser template.</p>
  
  <p>Hope this is clear enough! </p>