I am trying to identify in my Event System and in my Templates when the rendering (template) or the action (event system) is being triggered from either Experience Manager or somewhere else in the system. The reason being I don't want some Events to execute if the user is doing inline editing or adding a component to a page from Experience Manager.

In the same way, I want my template to behave differently if the rendering is taking place in Experience Manager (I know this question might have been asked already, but can't find it)

I know that the RenderMode will tell me something, but I now it doesn't always tell you the "truth".


2 Answers 2


You can identify if you code is being called from Experience Manager in your templates by checking the Render Mode and the Publication Target, if the Render Mode is Dynamic and the Publication Target is not null then your template is being called from Experience Manager.


Starting with Tridion 2013 we introduced a way for clients to identify themselves to the core, and this information can be retrieved from the Event System. See this answer's comments to see how Webdav identifies itself. I do not know if Experience Manager already uses this relatively new feature, but it will in the future for sure.

In regards to how to determine this in the Template, check this answer on Stack Overflow.

  • That second answer you mentioned (stackoverflow.com/a/14642317/866454) describes how to identify session preview and normal (both CME and XPM) publishing. I think what Jaime is looking for is to identify XPM rendering (either preview or publishing). We cannot identify XPM rendering with the PublicationTarget and RenderMode parameters.
    – Jan H
    Nov 8, 2013 at 15:39
  • So all our hopes are on TcmApplicationId from the first answer you mentioned (see tridion.stackexchange.com/a/3001/33). Did anyone try TcmApplicationId?
    – Jan H
    Nov 8, 2013 at 15:40
  • Jan, you can identify XPM rendering. What you cannot is identify XPM was the source from the Event System.
    – Nuno Linhares
    Nov 8, 2013 at 16:03
  • Interesting information, will check it out. Nov 8, 2013 at 16:11

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.