I need to have 2 different routes e.g.:
/experiment
/experiment/url1
that render same template (the html file is constructed as a dynamic template ) and also have same logic (.js file).
The routes.js looks like below:
FlowRouter.route('/experiment', {
action: function() {
BlazeLayout.render('experiment', {
main: "experiment"
});
return document.title = "Experiment";
},
});
The only difference between the 2 different routes is that in the last page of the dynamic template for the route :
/experiment/url1
I need to add a text and a random id which also should be saved calling a method.
What is the best way to achieve this?