Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Using attribute variables in code-behind?

Vote:
 

Hi,

I'm trying to put together a simple personalized email based on a CMS page where I'd like to include the recipient's name and other values using the variables §a§, §b§, §c§ etc from the recipient list. Is there any way of getting access to these values from code-behind?

Regards,
Helena

#32190
Aug 25, 2009 14:08
Vote:
 

Are you trying to make a CMS page where the additional attributes for some recipient are displayed?

(The §a§ etc placeholders should work normally when sending the CMS page as a mailing in EPiServer Mail.)

 

Something like this should be a starting point:

IRecipientSource theSource = EPiServerMailModule.GetRecipientSource(...);

Recipient recipient = theSource.GetRecipient(...);

And on the recipient object the property Attributes should have the relevant data.

 

However, GetRecipient takes the Guid that identifies the recipient, which you may or may not have handy in the codebehind of that CMS page.

#32201
Aug 25, 2009 16:42
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.