Posted on 28/04/2011 02:06:40
Hi Morten,
Notifications.NewsV2.ItemSaved does not sent additional information which operation was performed.
But you could to check request and determine operation type.
For example,
using System;
using Dynamicweb;
namespace CustomModules6.CustomModules.zzz
{
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.NewsV2.ItemSaved)]
public class NewsV2ItemSavedObserver1 : 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;
if (Base.ChkBoolean(System.Web.HttpContext.Current.Request["isCopy"]))
{
//todo: insert code here
}
}
}
}
//Dmitry