Click or drag to resize

StandardPagePageNotificationArgs Class

Provides information about the single page.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.NotificationsStandardPagePageNotificationArgs

Namespace:  Dynamicweb.Notifications
Assembly:  Dynamicweb (in Dynamicweb.dll) Version: 9.10.0
Syntax
public class PageNotificationArgs : NotificationArgs

The StandardPagePageNotificationArgs type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyPageBeforeChanges
Gets the instance of the page without the changes. For Saved and UrlWasAffected notification, this will represent the page and its properties before the editing that has taken place.
Public propertyTarget
Gets the instance to a target page.
Top
Remarks
Examples
C#
using Dynamicweb.Extensibility.Notifications;

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

            var pna = (Dynamicweb.Notifications.Standard.Page.PageNotificationArgs) args;
            //Pass page Id to the notification e-mail
            var emailBody = string.Format("The page (ID:{0}) has been saved.", pna.Target.ID);
        }
    }
}
See Also