Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Event on "Revert to Published"

Vote:
 

Hi!

How can I catch an event, when I click "Revert to Publish"?

#84929
Apr 09, 2014 15:29
Vote:
 

Basically, you can listen on:

IContentEvents.DeletedContentVersion

 on server side then I guess that you'll have a confusion between "Revert To Published" and "Delete Version" action!

But never mind you can use client side as a "spy agency" to do this.

dojo.require(["dojo/aspect", "epi/dependency"], function(aspect, dependencey) {
    var editingCommands = dependency.resolve("epi.cms.contentEditing.command.Editing");
    aspect.before(editingCommands.revertToPublished, "_execute", function() {
        // TODO: Reverting Content To Published
    });
});

    

I don't try this code above but I think it's should work.

//Ha Bui

#84946
Edited, Apr 10, 2014 6:36
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.