おそらく、この構造はMeteorに適していません。あるいは、私はそれについて間違っていると考えています。noSQLデータベースでこのような関係を作ろうとしていますか?
DropzoneとWidgetのコレクションがあります。ドロップゾーンには多くのウィジェットを含めることができ、各ウィジェットは複数のドロップゾーンに存在できます。
私の問題は、ハンドルバーにフィルタリングされたウィジェットのリストをレンダリングさせることができないように見えることです。
私のドロップゾーンモデル
dropzone =
_id: "area1-id"
title: "Area 1"
ウィジェットモデル(省略形)
widget =
_id: "widget1-id"
title: "My Widget"
dropzones: ['area1-id', 'area2-id']
# each widget stores an id of which dropzones it's associated with
関連するテンプレート構造
{{#each dropzones}}
<div class="dropzone span4">
<h1>{{title}}</h1>
<div class="widget-area">
<div class="hotzone">
{{#widgets _id}} # passing in the current dropzone id
{{/widgets}}
</div>
</div>
</div>
{{/each}}
ヘルパー機能
# returns the correct sets of widgets, but can't figure
# out how to make it render the widget partial
Handlebars.registerHelper 'widgets', (drop_id)->
widgets = CC.Widgets.find(dropzones: drop_id)
_.each widgets, (widget)->
Template.widget(widget) # this ends up being blank with no error