For some reason the pathFor function is not working when I have vars in my path. I have it working for a different controller and route but not this one. I'm not sure why and trying to better understand how the pathFor function works.
My route
this.route('topPublicLinks', {
path: '/:permalinkUser/:permalink/top/:linksLimit?',
layoutTemplate: 'layoutPublic',
controller: TopicPagePublicBestLinksController
});
The controller
TopicPagePublicBestLinksController = TopicPagePublicController.extend({
sort: {votes: -1, submitted: -1, _id: -1},
nextPath: function() {
return Router.routes.topPublicLinks.path({linksLimit: this.limit() + this.increment})
}
});
and the pathfor
<a href="{{pathFor 'topPublicLinks'}}" type="button" class="btn btn-white {{activeButtonNav 'top'}}">Top Links</a>