3

I want to display the below warning message(message bar) on saving a component in Tridion 2013. if (component.HasLocalCopies()) {
xCustomMessage = "There is a localized version of this component."; Logger.WriteInfo(xCustomMessage);

1 Answer 1

5

I am pretty sure that you can only show message bar errors directly from your event system code by raising exceptions from GUI triggered events (like saving a component) - however this would be an error rather than a warning, and would also prevent the component being saved.

In order to have more control over messages in the message bar, you have to undertake a more complicated approach, which will involve a GUI extension to poll for messages which you send from a server - as outlined in this article. The advantage of this approach is that you can send any kind of messages from anywhere, but it maybe a bit of a sledgehammer approach for your rather simple problem.

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.