Vulcan/packages/telescope-daily/lib/routes.js

32 lines
623 B
JavaScript
Raw Normal View History

2015-05-10 13:37:42 +09:00
/**
* Controller for daily view
*/
2015-05-07 15:44:12 +09:00
Posts.controllers.daily = Posts.controllers.list.extend({
2015-05-07 15:44:12 +09:00
view: "daily",
template: function() {
// use a function to make sure the template is evaluated *after* any template overrides
2015-05-07 15:44:12 +09:00
// TODO: still needed?
return 'posts_daily';
},
data: function () {
var daysCount = this.params.daysCount ? this.params.daysCount : daysPerPage;
return {
daysCount: daysCount
};
2015-05-07 15:44:12 +09:00
}
});
Meteor.startup(function () {
Router.route('/daily/:daysCount?', {
name: 'postsDaily',
2015-05-18 10:00:41 +09:00
template: 'posts_daily',
2015-05-07 15:44:12 +09:00
controller: Posts.controllers.daily
});
});