Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When a user saves a given doc type I want to check a proprty value, if it has changed from the original value I want to perform some action.
Thanks in advance.
Someone must know how to do this?
I guess you can use an event for this - if you have access to Umbraco.TV, there's a series of videos explaining how to do something like that:
Hope that helps,
I know how to use the events, what I need help with is the santax... heres what I mean.
void ContentService_Saving(IContentService sender, Umbraco.Core.Events.SaveEventArgs<IContent> e)
foreach (var myNode in e.SavedEntities.Where(x => x.HasProperty("propertyName")))
//bla bla bla
Also is there a version of this method that is a single IContent object rather than a list, In previous versions was this not the case?
I found this method
IContent.IsPropertyDirty() can't find any documentation on it though... any ideas?
This is the answer I was looking for..................... why is there no documentation on this method :-/
foreach (var myNode in e.SavedEntities.Where(x => x.HasProperty("myproperty")))
I found out that in the ContentService_Publishing you can compare current value and old one for example:
private void ContentService_Publishing(PublishEventArgs<IContent> args, ApplicationContext applicationContext)
var contentService = applicationContext.Services.ContentService;
foreach (var item in args.PublishedEntities)
var name = item.Name;
var id = item.Id;
var oldName = contentService.GetById(id).Name;
if (name != oldName)
And register your method here:
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
ContentService.Publishing += (sender, arg) => ContentService_Publishing(arg, applicationContext);
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted