Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Display contact's salution in newsletter View modes: 
User avatar
Certified Developer 8
Certified Developer 8
majoor-evident - 5/14/2013 9:15:36 AM
   
Display contact's salution in newsletter
Hello,

I've created a newsletter and subscribed a contact group to it. Is it possible to display data such as salutation and company name from these contacts in my newsletter? I tried various macros, {% OnlineMarketingContext.CurrentContact.ContactSalutation %} are set; the default fields for a subscriber.

Regards,
Martijn

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 5/14/2013 11:20:46 AM
   
RE:Display contact's salution in newsletter
I haven't worked with newsletters and contacts but you should be able to setup a custom macro that would get that information by a contacts email address.

You could also modify the macro resolver for newsletters which would involve quite a bit of work. I have a few steps here I asked about in a different post that might help get you pointed in the right direction for this process.

Good luck.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 5/16/2013 4:43:22 AM
   
RE:Display contact's salution in newsletter
Hello Martijn,

As a FroggEye suggester... the best option will be to create a custom macro and one thing you can take benefit of is the context macro of Marketing that is passed to the Newsletter as a parameter:
{% OnlineMarketingContext.CurrentContact.ContactID %}

So you can simply use this in your custom macro and depending on the ContactID you will be able to get all info about the contact that you need.

Best regards,
Martin Danko

User avatar
Certified Developer 8
Certified Developer 8
majoor-evident - 5/16/2013 8:42:39 AM
   
RE:Display contact's salution in newsletter
Hi,

Thanks for your reply. I think I might be referencing the contacts wrong. Here's what I did:

- manually created 2 contacts and added them to a contact group
- subscribed the contact group to my newsletter
- added the macro {% OnlineMarketingContext.CurrentContact.ContactID %} to my newsletter template (just to see what IDs it would output)
- Send the newsletter

Both my subscribers receive the mailing, but both have the same contactID. You're saying these IDs will differ if I use a custom macro? Honestly, I'd be surprised if that were the case :)

Regards,
Martijn