Aldeed:Tabular working with Flow Router


I want to filter my Aldeed:Tabular table based on the URL, e.g. if someone enters, the table should filter by productA. I followed the Aldeed:Tabular instructions to filter a collection like below:

    '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 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"});

You could use FlowRouter to get the product type from the url:

FlowRouter.route('route/:product', { name: 'Product', action(params, queryParams) { BlazeLayout.render('mainLayout', {content: 'yourView'}); } });

Then get the product within your helper with:


Which will get you whatever comes after “route/” in your url.