I am trying to display 3 projects per row. My template looks like this: (UPDATED)
{{breakTimeReset
You can group your data before it gets rendered:
Template.projectList.helpers({
projects: function () {
all = Projects.find({}).fetch();
chunks = [];
size = 3
while (all.length > 3) {
chunks.push({ row: all.slice(0, 3)});
all = all.slice(3);
}
chunks.push({row: all});
return chunks;
},
breakTimeReset: function () {
Template.projectList.doCount = 0;
},
breakTime: function () {
count = Template.projectList.doCount + 1;
console.log(count);
Template.projectList.doCount = count;
if (count % 3 == 0)
return "
Sorry I missed so many times, nearpoint!