NotificationsCategorySaved Field |
Namespace: Dynamicweb.News
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.NewsV2.CategorySaved)] public class NewsV2CategorySavedObserver : Dynamicweb.Extensibility.NotificationSubscriber { public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args) { if (args == null || !(args is Dynamicweb.NewsV2.Extensibility.NewsItemCategoryNotificationArgs)) return; Dynamicweb.NewsV2.Extensibility.NewsItemCategoryNotificationArgs item = (Dynamicweb.NewsV2.Extensibility.NewsItemCategoryNotificationArgs)args; item.Category.Description = "NewsV2CategorySavedObserver"; item.Category.Save(); } }