Developer forum

Forum » CMS - Standard features » Page changes E-Mail notification

Page changes E-Mail notification

Denys Ubizskyy
Reply
Hi all,

I wonder if there is any way to notify a certain user via e-mail when any changes are made to a DW page (i.e. content changes, paragraph changes).
Have anyone had such experience? 

Thanks in advance.

Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Denys,

 

You should be able to accomplish this with Notification Subscribers for Page.Saved and Paragraph.Saved. The Dynamicweb templates for Visual Studio have ready-made templates for these. Here's how Page.Saved could look like:

 

 [Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Page.Saved)]
  public class PageSavedObserver1 : Dynamicweb.Extensibility.NotificationSubscriber
  {
    public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
    {
      if (args == null)
        return;

      Dynamicweb.Notifications.Standard.Page.PageNotificationArgs pna = (Dynamicweb.Notifications.Standard.Page.PageNotificationArgs)args;

      //TODO: Add code here
    }
  }

 

 

Cheers,

 

Imar

 

You must be logged in to post in the forum