Walkthrough: Extending the List Manager to show custom columns in a Contact list
To see specific contact facet data, you can customize the columns that are displayed in a Contact list. This is useful when you want to have additional columns (such as Phone and City for example) in the Contact list table. By default, the Contact list table contains only Email, First Name, and Last Name.
This walkthrough describes how to:
-
Create and customize a model to extend the default List Manager model
-
Create a new configuration file
After you complete this walkthrough, you must also add a column to the Contact list to display the custom facet.
Create and customize a model to extend the default List Manager model
Create and customize a model to extend the default List Manager model
Start by creating a new project to store your model and then customize your new model to extend the default List Manager model.
To create and customize a model to extend the default List Manager model:
-
In Visual Studio, create a project called, for example,
ContactListExtender. -
Create a
ContactDataModelWithPhoneNumberclass that inheritsSitecore.ListManagement.Services.Model.ContactDataModel. -
Add a custom field (for example,
PhoneNumber) to the custom model class. -
Create a
ListSubscribersWithPhoneNumberMapperclass that inherits theSitecore.ListManagement.Services.Mappers.IListSubscribersMapperinterface. -
Override the
MapSubscribersmethod to return theContactDataModelWithPhoneNumbermodel. -
Create a
CustomServiceConfiguratorclass to replace the default implementation.
Create a configuration file
Create a configuration file
Next, you must create a new configuration file to apply the configuration changes.
To create a configuration file:
-
Create a
ContactListExtenderconfig file to apply the configuration changes. -
Copy the configuration file to the
<website_path>\App_Config\Includefolder.