NotificationsItemSaving Field |
Namespace: Dynamicweb.News
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.NewsV2.ItemSaving)] public class NewsV2ItemSavingObserver : Dynamicweb.Extensibility.NotificationSubscriber { public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args) { if (args == null) return; if (!(args is Dynamicweb.NewsV2.Extensibility.NewsItemNotificationArgs)) return; Dynamicweb.NewsV2.Extensibility.NewsItemNotificationArgs news = (Dynamicweb.NewsV2.Extensibility.NewsItemNotificationArgs)args; news.Item.NewsAuthor = "me"; } }