Hi,
I want to filter my Aldeed:Tabular table based on the URL, e.g. if someone enters mysite.com/productA, the table should filter by productA. I followed the Aldeed:Tabular instructions to filter a collection like below:
Template.loginstemplate.helpers({
'selector': function() {
return {Recordtype: "A"};
}
})
And in my HTML file:
{{> tabular table=TabularTables.Logins selector=selector class="table table-bordered" width="100%"}}
How can I make Flow Router change the selector function to different products? e.g. the URL mysite.com/productB should cause the selector function to return:
return {Recordtype: "B"};
My Flow Router routes.js looks like this right now:
FlowRouter.route('/logins/show', {
action: function() {
BlazeLayout.render("mainLayout", {content: "loginstemplate"});
}
});