Template.viewSingleInvitation.created = function () {
  // Get reference to template instance
  var instance = this;

  // Get File IDs from template instance
  instance.fileIds = instance.data.fileIds;

  // Subscribe to files for this invitation
  instance.subscribe('invitationFiles', instance.fileIds);
};

Template.viewSingleInvitation.helpers({
  'files': function () {
    return Files.find().fetch();
  }
});

Template.viewSingleInvitation.created = function () {
  // Get reference to template instance
  var instance = this;

  // Get the current invitation ID
  var invitationId = Router.current().params.invitationId;

  // Subscribe to files for this invitation
  instance.subscribe('invitationComposite', invitationId);
};

Template.viewSingleInvitation.helpers({
  'files': function () {
    return Files.find().fetch();
  }
});

Add template-level, composite subscription