Detecting an EXM request

Last updated Friday, June 9, 2017 in Email Experience Manager for Developer

For the message body, you can use a different layout than for your usual webpages. To display the appropriate layout, you need to determine whether the EXM is requesting the message body or if this is a normal page request.

  • To detect an EXM request, you can use the property in IsRenderRequest in Sitecore.Modules.EmailCampaign.Core.ExmContext.

If the property is true, EXM is requesting the message body, otherwise it is a normal page request.

Send feedback about the documentation to docsite@sitecore.net.