6

I would like to show a message in the new (and improved) Tridion 2013 MessageCenter.

In Tridion 2011 I used the following code: $messages.registerNotification(data);

However, this does not work in Tridion 2013.

Any ideas?

1
  • 2
    just tried on the chrome console $messages.registerNotification("hi there") and it worked as expected
    – Nuno Linhares
    Sep 16, 2013 at 10:54

3 Answers 3

5

You can try this.

var msg = $messages.createMessage(Tridion.MessageCenter.Implementation.Notification, "Text", "Title", false/true, false/true);
$messages.registerMessage(msg);
0
6

I haven't seen any changes with regards to the $messages API between 2011 and 2013, the following calls all work fine on 2011 and 2013 for me:

$messages.registerNotification("custom notification message");
$messages.registerError("custom error message", null, null, null, true);
$messages.registerWarning("custom warning message", null, null, true);

Even using the predefined messages from the resource bundle still work for me:

$messages.registerNotification($localization.getEditorResource("PublishPopupSentToPublishQueue", "tcm:0-0-0");

So I'm expecting something else is wrong, maybe your data object is not defined?

2

You may also want to explore the SignalR and Message Center integration.

A step by step process has been explained very nicely by Robert and Will on SDL Tridion World site.

You may refer the link below for details:

http://sdltridionworld.com/articles/sdltridion2011/signalr_messagecenter.aspx

3
  • You're preaching to the choir Pankaj - Robert was a co-author of that article :)
    – Nuno Linhares
    Oct 16, 2013 at 10:32
  • Yeah, Robert is a co-author with Will Price of this fantastic article Oct 16, 2013 at 10:55
  • robrtc from this post = Robert from the fantastic article :-)
    – Jan H
    Oct 16, 2013 at 19:08

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.