Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Template.recentNotifications.helpers({
- // Check the current notification type for template usage.
- notificationType: function (type) {
- return this.type === type;
- },
- // Return set of notifcation cursors.
- notifications: function () {
- return Notifications.find( {}, { sort: { createdAt: -1 } } );
- },
- // Helper for comment related notification data.
- comment: function() {
- Meteor.subscribe('commentPostId', this.sourceId);
- return Comments.findOne(this.sourceId);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement