I would like to show a message in the new (and improved) Tridion 2013 MessageCenter.
In Tridion 2011 I used the following code:
However, this does not work in Tridion 2013.
You can try this.
var msg = $messages.createMessage(Tridion.MessageCenter.Implementation.Notification, "Text", "Title", false/true, false/true); $messages.registerMessage(msg);
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:
So I'm expecting something else is wrong, maybe your
data object is not defined?
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: