title: How do I access iron-router path variables in Template.x.rendered?
body: <h2>Background</h2>
  
  <p>In the iron-router path definition you can use variables, like in this example in the docs:
  <a href="https://github.com/EventedMind/iron-router#controlling-subscriptions" rel="nofollow">https://github.com/EventedMind/iron-router#controlling-subscriptions</a></p>
  
  <p>This is all fine and it does exactly what I want except I son't want to do this in the waitOn clause but in the rendered callback for a specific sub template. I have several of these and I would like them to render independently and not on load as waitOn suggests. </p>
  
  <p>My router looks like this:</p>
  
  <pre><code>Router.map( function () {
    this.route('de', {
      path: '/monitor/DE/:period',
      data: function () { 
        return {subtitle: "Germany - " + this.params.period + " data"}; 
      }
    });
  });
  </code></pre>
  
  <p>I also have some template code that run on rendered to draw a d3 graph. In this function I define a Deps.autorun containing a subscription. </p>
  
  <pre><code>Template.de.rendered(function (){
    // lots of d3 stuff...
  
    // Automatically redraw on change
    Deps.autorun(function () {
      Meteor.subscribe("count", "hourly");
    });
  });
  </code></pre>
  
  <p>I publish the collection with _id as timestamps using a parameter like this:</p>
  
  <pre><code>Meteor.publish("count", function(period) {
    if(period == "hourly") {
      return Count.find({_id: {$gt: new Date().getTime() - 3.6e6*24}}, 
                          {sort: {_id: -1}});
    } else {
      return Count.find({_id: {$gt: new Date().getTime() - 3.6e6*24*30}}, 
                          {sort: {_id: -1}});
    }
  });
  </code></pre>
  
  <p>This code works fine, but I have hard coded the parameter in the subscription. I would like to use the path variable to change the subscription scope.</p>
  
  <h2>Question</h2>
  
  <p>How can i use an iron-router path variable to change a subscription in the Template.x.rendered callback?</p>