mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00
32 lines
640 B
JavaScript
32 lines
640 B
JavaScript
/**
|
|
* Controller for daily view
|
|
*/
|
|
Posts.controllers.daily = Posts.controllers.list.extend({
|
|
|
|
view: "daily",
|
|
|
|
template: function() {
|
|
// use a function to make sure the template is evaluated *after* any template overrides
|
|
// TODO: still needed?
|
|
return 'posts_daily';
|
|
},
|
|
|
|
data: function () {
|
|
this.days = this.params.days ? this.params.days : daysPerPage;
|
|
Session.set('postsDays', this.days);
|
|
return {
|
|
days: this.days
|
|
};
|
|
}
|
|
|
|
});
|
|
|
|
Meteor.startup(function () {
|
|
|
|
Router.route('/daily/:days?', {
|
|
name: 'postsDaily',
|
|
template: 'posts_daily',
|
|
controller: Posts.controllers.daily
|
|
});
|
|
|
|
});
|