Class ContactManagementContext
- Namespace
- CMS.ContactManagement
- Assembly
- CMS.ContactManagement.dll
Contact context method and variables.
public class ContactManagementContext : AbstractContext<ContactManagementContext>, IDataContainer, ISimpleDataContainer, IContext, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable, ICloneThreadItem
- Inheritance
-
objectContactManagementContext
- Implements
- Inherited Members
- Extension Methods
Properties
CurrentContact
Current contact info.
[RegisterProperty]
public static ContactInfo CurrentContact { get; }
Property Value
CurrentContactID
Current contact ID.
[RegisterColumn]
public static int CurrentContactID { get; }
Property Value
- int
Methods
GetCurrentContact(bool)
Returns current contact. Tries to find contact in persistent storage or to recognize
it according to known information. If no contact can be found and createAnonymous
is true (default), it creates a new anonymous contact. If Online marketing is
not enabled or there is no license for ContactManagement found, null is returned. Also, null is returned if request
is made by crawler (googlebot, etc.).
public static ContactInfo GetCurrentContact(bool createAnonymous = true)
Parameters
createAnonymous
boolIndicates whether anonymous contact should be created if no contact information can be found.
Returns
- ContactInfo
Current contact