I currently have the below route and it works great. I want to change the path that is being used to a different id that is inside the same document (not a mongoDB generated id). How can I change this route to use a different id in the path?
this.route('thanks', {
path: ':root/thanks/:_id',
waitOn: function() {
return Meteor.subscribe('donate', this.params._id)},
data: function () {
var root = Meteor.settings.root;
return Donate.findOne(this.params._id);
},
action: function () {
if (this.ready())
this.render();
else
this.render('Loading');
}
});
In my client side code I do this to return the page.
Router.go('/give/thanks/' + result);