title: How can I show only comments with id equal to a certain id associated with a given page?
body: <p>I am trying to write a basic "website discussion and sharing" app with Meteor and MongoDB. I'm very new to coding and this is just for my own edification. They way i've written it so far I can post comments on individual pages associated with shared websites but every comment shows up on every site page regardless of on which page the comment was made. I have made it so that the comments save with the siteId as their own Id so I would think this would be easy, but after 5 hours of fiddling and googling, I have not made any progress. I'll include the relevant code snippets below and would greatly appreciate any help!</p>
  
  <p>in main.html I have this template...</p>
  
  <pre><code>&lt;template name="discussSite"&gt;
      &lt;h3&gt;Discussing: {{url}} &lt;/h3&gt;
      {{&gt; addCommentForm}}
  
    {{#each comments}}
    &lt;div class="comment" id={{siteId}}&gt;
    &lt;h4&gt;{{text}}&lt;/h4&gt;
    &lt;h5&gt;by {{createdBy}} on {{createdOn}}&lt;/h5&gt;
    &lt;h6&gt;id: {{siteId}}&lt;/h6&gt;
  
    &lt;/div&gt;
    {{/each}}
  
  &lt;/template&gt;
  </code></pre>
  
  <p>and in my events.js I have...</p>
  
  <pre><code>Template.addCommentForm.events({
   'click .js-add-comment':function(event){
       var comment_text = $('#comment_input').val();
       var user = 'anonymous person';
       var site = this;
       if (Meteor.user()){
           user = Meteor.user().emails[0].address
       }
       var comment = {"text":comment_text,
                      "siteId":site._id,
                   "createdOn":new Date(),
                   "createdBy":user};
      Comments.insert(comment);
       return false;
   }
  });
  </code></pre>
  
  <p>Finally, in my helpers.js (which I know is where the bulk of the problem is. I don't quite understand how to use .find({}) commands and filters yet...</p>
  
  <pre><code>Template.discussSite.helpers({
  
  'comments':function(siteId){
  
  return Comments.find();
  
  },
  
  });
  </code></pre>
  
  <p>So to summarize, when I comment on site #1 it shows up, but the problem is that the same comment shows up under site #2 and site #3. How can I attach it to the site under which it was created and keep it there?</p>
  
  <p>Thanks so much for any help!</p>