1 karma · joined Mar 20, 2015 (11y ago) · 1 submissions
comment 11y ago · link · parent
A typical example would be to display a "post" with comments from two different collections:
Template: <template name="posts"> {{#each post}} {{title}} {{body}} {{#each comment _id}} {{username}} {{body}} {{/each}} {{/each}} </template>
Helpers definition: Template.posts.helpers({ post:function(){ return Posts.find(); }, comment:function(post_id){ return Comments.find({post_id: post_id}); } })