Table of Contents

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

Constructors

PageNotificationArgs(Page)

Initializes a new instance of an object.

public PageNotificationArgs(Page target)

Parameters

target Page

Target page.

PageNotificationArgs(Page, Page)

Initializes a new instance of an object.

public PageNotificationArgs(Page target, Page pageBeforeChanges)

Parameters

target Page

Target page.

pageBeforeChanges Page

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

Page

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; }

Property Value

Page
To top