Class Standard.Page.PageNotificationArgs
- Namespace
- Dynamicweb.Notifications
- Assembly
- Dynamicweb.dll
Provides information about the single page.
public class Standard.Page.PageNotificationArgs : NotificationArgs
- Inheritance
-
Standard.Page.PageNotificationArgs
- Inherited Members
Examples
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);
}
}
}
Remarks
Arguments passed to Dynamicweb.Notifications.Standard.Page.Saved notification, Dynamicweb.Notifications.Standard.Page.Deleted notification, Dynamicweb.Notifications.Standard.Page.PublishedStateChanged notification, Dynamicweb.Notifications.Standard.Page.ActiveStateChanged notification, Dynamicweb.Notifications.Standard.Page.Optimized notification Dynamicweb.Notifications.Standard.Page.UrlWasAffected notification
Constructors
PageNotificationArgs(Page)
Initializes a new instance of an object.
public PageNotificationArgs(Page target)
Parameters
target
PageTarget page.
PageNotificationArgs(Page, Page)
Initializes a new instance of an object.
public PageNotificationArgs(Page target, Page pageBeforeChanges)
Parameters
Properties
PageBeforeChanges
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 Page PageBeforeChanges { get; }
Property Value
Remarks
Can be null - for new pages or notifications that does not have a previous version to attach
Target
Gets the instance to a target page.
public Page Target { get; }