4

We store the number of UGC comments on components within a separate system for performance reasons but need to update this when/if an editor deletes a comment from with the Tridion GUI.

My understanding is that there are no specific UGC events within the event system that can be subscribed to so that really only leaves extending the UGC extension itself to provide my own Delete Comment implementation (I've had a dig around and can see a Delete.js under \Tridion\web\WebUI\Editors\UGC\Scripts\Commands) to add an additional call to my own service which can update our external system.

Is it possible to extend UGC in this way?

I'm assuming it would be supported by SDL as Id be leveraging the GUI Extension framework rather than just hacking existing JS files.

2 Answers 2

5

It is possible to extend commands in the GUI using a GUI extension please see the Nuno's answer here How to extend a GUI command. In that answer Nuno is extending the Save command but you can apply the same logic for UGC. Remember that since Nuno was extending the standard Save command he was applying the GUI extension to CME you have to apply it to UGC.

4

Indeed you can listen to Delete command, but then you'd have to track UGC item or items if the operation was successfully completed. As other option, you can track the item kind of directly.

If you are using version UGC 2013 GA or above:

1\ You can create extender for DeleteUgcItem command of UGC.svc service. Besides that, you can also listen to SaveUgcItem/SaveUgcNewItem if you need some more data to collect.

2\ You can create ItemType extender of Tridion.UGC.Model.Comment, and extend implementation of onDelete/onDeleteError as well as onSave/onSaveError.

If you are using version below UGC 2013 GA:

.. well I hope you are not using this version. But in this case, I`d go with the solution suggested by Eric.

1
  • As tagged, using version with 2011 SP1 HR1.
    – Neil
    Commented Feb 14, 2014 at 13:29

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.