Detect if contact is a member of specific contact group using macros

In a K# you can check if a given contact is a member of a specific contact group, there is already a method for this purpose which isn't documented anywhere, so you can simply use the following method:


So you can end up with macro like this:

{ % Siteobjects.Contacts.Where("ContactEmail=''")[0].ContactGroups.CodeNames["Unsubscribed"]!=null# % }
Share this article on   LinkedIn Google+

Martin Danko

Let me guide you on your journey of success. I will show you how to optimize your content production with Kentico Draft. Check out