Question

I have implemented a layout and sublayouts for my Sitecore ECM implementation, it renders and emails great. What I am struggling with now is getting the context recipient in my sublayout so I can personalize the display. I need to evaluate relationships and other small business logic that can not be evaluated with the simple $token$ syntax.

I've been using the Sitecore.Context.User to no avail. So my question is, what is the proper way to get the context user in a Sitecore ECM sublayout?

Sitecore.NET 6.5.0 (rev. 121009) E-mail Campaign Manager 1.3.3 (rev. 130212)

Was it helpful?

Solution

You can access the current recipient during the rendering of a Sitecore ECM Newsletter by using the ec_recipient POST variable:

Sitecore.Security.Accounts.User.FromName(Request["ec_recipient"]);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top