cmather / blaze-layout

A Meteor Blaze powered layout component for dynamic rendering.
Other
49 stars 8 forks source link

#each iterator #10

Closed TimoRuetten closed 10 years ago

TimoRuetten commented 10 years ago

Is there still a solution for a working iterator for the #each operation in my template ?

The last solutions are not working anymore in the newest meteor version.

cmather commented 10 years ago

Hi @Visudare, Can you be a little more specific :)? If you want me to look at some code, post a reproduction. Is there something not working correctly with each?

TimoRuetten commented 10 years ago

Hey!

Dont know if "iterator" is the right word for my stuff i am looking for. But i am looking for a build-in option for a loopCounter in each. smth like:

{{#each array}}

{{#if loopCounter==3}} // smth {{/if}}

{{/each}}

cmather commented 10 years ago

No worries @Visudare. If you're looking for the current iterator index, that would be a feature for meteor core. The blaze-layout package (here) is a third-party package for dynamically rendering templates and regions. You could also post this question on the meteor-talk mailing list (google group) as I'm sure some people have come up with solutions.

TimoRuetten commented 10 years ago

Oh - its a Core-Feature ? Thougth that Handlebars or Blaze-Layout is responsible for this feature. Sorry for this (:

cmather commented 10 years ago

It's implemented in the core package named "ui" which you can find in meteor/packages/ui/each.js :).

TimoRuetten commented 10 years ago

Now i feel like its my first to time to use a script-language. Sorry for my issue! Thanks.