Sitefinity Toolkit Module Templates

These classes add Workflow Notifications to the News, Events, Blogs, and Generic Content Sitefinity Modules, sending emails to the responsible users whenever an items workflow status changes.

To use, you need to define an external admin template for ContentItemPreview, and change it to inherit from the corresponding class.

For example, for the Events Module, define the template EventsItemPreview.ascx and in the code-behind (EventsItemPreview.ascx.cs) change the base class (by default this is UserControl) to EventsItemPreview (make sure to reference the appropriate namespace for the class).

The base class options are:
  • EventsItemPreview (Events)
  • GenericContentItemPreview (Generic Content, default provider only)
  • NewsItemPreivew (News)
  • PostPreview (Blogs Posts)
  • ContentItemPreviewBase (Base class for the above options, do not use this directly)

Roles

In order for the notifications to work, a Role needs to be defined that matches the Provider exactly. For example, to enable notifications for the Events module (which has a default provider named "Events"), create a role named "Events".

Users who are members of both the provider role AND who have approval permissions will receive "ForApproval" emails. Users who are members of the provider role AND have publishing permissions will receive "Approved" emails.

NOTE only the DEFAULT provider will have notifications enabled, so if there is more than one provider (for example if your site uses three providers for Generic Content) only the DEFAULT provider notifications will be sent.

Last edited Jan 12, 2012 at 1:26 AM by SelArom, version 2

Comments

No comments yet.