Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8154801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:28:24+00:00 2026-06-06T16:28:24+00:00

Perhaps this structure is not a good fit for Meteor, or maybe I’m thinking

  • 0

Perhaps this structure is not a good fit for Meteor, or maybe I’m thinking about it wrong.
Is trying to do a relation like this bad in a noSQL db?

I have Dropzone and Widget collections. A Dropzone can have many widgets, and each widget can exist in more than one dropzone.

My problem is that I can’t seem to make Handlebars render the filtered list of widgets.

My dropzone model

dropzone =
  _id: "area1-id"
  title: "Area 1"

Widget model (abbreviated)

widget =
  _id: "widget1-id"
  title: "My Widget"
  dropzones: ['area1-id', 'area2-id'] 
  # each widget stores an id of which dropzones it's associated with

Relevant template structure

{{#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}}

Helper Function

# 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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:28:25+00:00Added an answer on June 6, 2026 at 4:28 pm

    I think what you want looks a little more like this:

      <div class="hotzone">
        {{#each widgets}}
          {{> widget}}
        {{/each}}
      </div>
    

    Helper:

    Template.foo.widgets = -> CC.Widgets.find(dropzones: this._id)
    

    Does that help?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question pertains primarily to good design. Suppose I have a controller action like
I've been searching for this to no avail, perhaps it's not really a thing.
Perhaps this is an effect of installing the new 4.5 beta, but my simulator
Perhaps this question has been asked elsewhere, but I'm unable to find it. With
Perhaps this has something to do with it being the mainForm, but I'll ask
I have an ObjectDataSource (but perhaps this question is the same for all kinds
I'm new to visual studio, so perhaps this is something easy... but I've had
Has anyone ever heard of overriding too many classes in Java? Perhaps this issue
This is perhaps more of a discussion question, but I thought stackoverflow could be
OK, this is perhaps stupidest question ever but bear with me.... How to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.