Click or drag to resize

NotificationsCategorySaved Field

Occurs after the news category has been saved.

Namespace:  Dynamicweb.News
Assembly:  Dynamicweb.News (in Dynamicweb.News.dll) Version: 1.0.10
Syntax
public const string CategorySaved = "DWN_MODULES_NEWSV2_CATEGORYSAVED"

Field Value

Type: String
Remarks
Examples
Example
[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();
       }
   }
See Also