4

Is it possible to track changes made to a content editor web part and alert users to these changes? Basically, the same thing that I would do with a list, but with a CEWP instead?

Thanks, Ninel

5 Answers 5

1

Yes, We can track the changes made to the Content Editor Web part. To achieve this, you have to create a file in txt format,(that should contains the contents in CEWP) with in a Document Library.

After creation of the file, add the file url in the Content Link, you can see that option in the Web part Properties of the CEWP.

By using this, we can track the modifications on CEWP and also send notifications, if any changes happen to CEWP.

1
  • 2
    If I'm not mistaken, when you link a document to a CEWP, you can't use in-line editing anymore on that CEWP. Commented Oct 25, 2012 at 10:53
0

it is possible to develop a Delegate Control with User Control (ascx) and jQuery to look for Content Editor web part changes over site pages, and send alerts if content gets changed. But, I believe it involves a lot of work. I wonder if there is a specific purpose behind developing such functionality?

0

Falak is right, it's not supported out of the box. What are your business requirements? If you are worried about tracking changes to pages then you can do the following:

  • Turn on versioning for the page and therefore track changes to the entire page.Then create an alert on that library or page.
  • If you need to have a specific area on the page people can change it's best to create a page layout and add a rich html field to it so it can eaily be edited. You can create an alert and it'll specify the field that was changed...
2
  • I have a team site created specifically for Board of Director members of our hospital. This site has multiple child sites with the same structure: a few document libraries and a CEWP. There are alerts on all document libraries which means many many emails. They want one email per child site to contain all changes related to these doc libraries and CEWP. These emails go out to Board of Directors.
    – ninel
    Commented Jun 8, 2012 at 13:08
  • Sorry I didn't reply earlier... new to the site. One way that comes to mind is having a timer job which checks all the libraries which need to be tracked for a last modified time within the mins since the last job ran and if you find an item comparing the versions edited using the SPFileVersion class... Another thing you can do is add an event handler which saves the properties that changed every time and run a timer job which sends out the emails the changes... Hope this helps...
    – mhijazi
    Commented Jun 15, 2012 at 1:13
0

I like the versioning idea but if you dont one other thing, you could create a custom part.

Inherit from the CEWP and add the custom code to do what you want. Reflector is your friend here!

Perhaps you would also want a feature receiver to remove the original CEWP from the gallery so it doesnt show up when adding to limit confusion.

0

If I understand correctly, your users modify multiple documents, and then change the CEWP to indicate that changes were made. You want to send ONE notification when they are done making changes, not as each document is changed.

If I might suggest a different direction, why not create an Announcements list and put it on the home page of each site? When a user is done making all their changes to the library, they add a new announcement on the home page, and you can add alerts on that Announcement list, so only one email is sent.

This has the added benefit of keeping track of who made changes and when, which your current model does not have. You can name the Announcements list whatever you want, like "Change Log" or something.

If you want to get really clever, change the permissions for the Announcement list to only allow Add permissions from the contributors, so they can't change theirs or someone else's entry, but have to make a new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.