0

I want to setup the Soft notification for publication, schema, bundle, component,page,structure and folder changes in sdl web8. it`s possible to setup soft notification. any one implemented before soft notification.

  • It's not clear from your question what exactly you are trying to do. Please add some details so that we can attempt to answer your question. It's useful to know what you want to do, what you've tried already, and what problems you experienced. – Dominic Cronin Dec 7 '16 at 19:50
  • 2
    Are you referring to this: docs.sdl.com/LiveContent/content/en-US/SDL%20Web%20Cloud-v1/… ? This is currently only available in Cloud, and will be included in Web 8.5 in a few weeks. – Nuno Linhares Dec 7 '16 at 20:40
  • Implemented Notification sending in event system side. But I want to Implement GUI receiving. I refer given above mention, but required more information. any one have sample code? please share it will help for me. – Sudhakar Rao Jan 14 '17 at 0:05
1

Soft Notifications (based on SignalR) is a new feature of SDL Web 8.2 (Cloud Only) and will only be available on premise when 8.5 is released (December 2016).

Therefore, I suspect you will not find anyone here with experience yet. It is however pretty well documented here.

  • 1
    And we can't wait for this too! – Dylan .. Mark Saunders Dec 9 '16 at 13:30
  • Though technically we use SignalR behind-the-scenes, as we go along describing this on Tridion Stack Exchange and in the community, we should refer to the Notification framework and Notification Broadcaster. – Alvin Reyes Dec 15 '16 at 18:32
  • Implemented Notification sending in event system side. But I want to Implement GUI receiving. – Sudhakar Rao Jan 14 '17 at 0:02
1

Final Implemented the logic and solution code:

Step1:

Create a SDLResponder.js

SDLWeb.ContentManager.SDLResponder = function SDLResponder() {
    Tridion.OO.enableInterface(this, "Tridion.ContentManager.SDLResponder");
    this.addInterface("Tridion.MarshallableObject");
    this.addInterface("Tridion.InitializableObject");
    this.initialize();
};

SDLWeb.ContentManager.SDLResponder.IDENTIFIER = "tcm:SDLResponder";

SDLWeb.ContentManager.SDLResponder.prototype._initialize = function SDLResponder$_initialize() {
    this.callBase("Tridion.InitializableObject", "_initialize");
    SDLWeb.Web.UI.Core.NotificationBroadcaster.getInstance().addEventListener("notification", this.getDelegate(this.handleNotification));
};

SDLWeb.ContentManager.SDLResponder.prototype.handleNotification = function SDLResponder$handleNotification(event) {
    if (event.data !== null) {
        var id = Tridion.ContentManager.UserSettings.getJsonUserSettings(true).User["@ID"];
        var data = event.data;
        if (data.details.userId !== null && data.details !== undefined) {

            if (data.details !== null && data.details.userId !== null && data.details.userId == id) {
                switch (data.action) {
                    case "PageSave":                       
                        //MessageCenter$registerNotification(title, description, local, modal, htmlDescription) for hyperlinks to work send true for html description
                        $messages.registerNotification("Notification", "" + data.details.messageNotification, true, null, true);
                        break;
                    case "ComponentSave":

                        //MessageCenter$registerNotification(title, description, local, modal, htmlDescription) for hyperlinks to work send true for html description
                        $messages.registerNotification("Notification", "" + data.details.messageNotification, true, null, true);
                        break;
                }
            }

        }
    }
};

if (!$models.getFromRepository(SDLWeb.ContentManager.SDLResponder.IDENTIFIER)) {
    $models.createInRepository(SDLWeb.ContentManager.SDLResponder.IDENTIFIER, "SDLWeb.ContentManager.SDLResponder");
};

Step2: Added below line into editor.config:

<cfg:file type="script">/Notifications/SDLResponder.js</cfg:file>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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