Listing pages facilitate object type (*Info class) listing.
All listing pages must inherit from the ListingPage base class. Override the ObjectType property to specify which objects are listed.
using CMS.Membership;
using Kentico.Xperience.Admin.Base;
public class UserObjectListing : ListingPage
{
// Set to the object type of the object you wish to have listed
protected override string ObjectType => UserInfo.OBJECT_TYPE;
}The bulk of listing page configuration is done within an override of the ConfigurePage method.
using System.Threading.Tasks;
using Kentico.Xperience.Admin.Base;
public class UserObjectListing : ListingPage
{
// ...
public override Task ConfigurePage()
{
// Listing page configuration code
return base.ConfigurePage();
}
}The individual configuration areas are described on the following pages:
The following table provides a reference of template configuration options available for listing pages via the PageConfiguration property.
Property | Type | Description |
|---|---|---|
Caption | string | The page's title. |
SubcaptionComponent | ISubcaptionComponent | A component rendered next to the listing page caption. See Add header subcaption. |
Callouts | List<CalloutConfiguration> | Configures an optional message box element that can be displayed above the listing. See Add callouts. |
ColumnConfigurations | IList<ColumnConfiguration> | |
ExportConfiguration | ListingExportConfiguration | Configures the listing's data export. null by default, which means the export is disabled. Set via the |
FilterFormModel | object | An instance of the model class that defines the filter UI for the listing. See Add a listing filter. |
HeaderActions | IList<ActionConfiguration> | Actions available from the table header. See Add header and item actions. |
MassActions | IList<ActionConfiguration> | Actions available when selecting more than one item in the listing. See Add mass actions. |
MaxVisibleRowActions | int | Determines the maximum number of table actions displayed for each item. Additional actions are hidden behind an expandable menu. |
PageSizes | IEnumerable<int> | Available page sizes for the listing. |
QueryModifiers | IList<QueryModifier> | Collection of modifications to the displayed data. See Modify loaded data. |
RowAction | ActionConfiguration | Action that occurs when a user clicks on a row in the listing. Set via the |
RowActionIconPlaceholders | int? | Can be used to customize the width of the listing's Actions column by overriding the number of action icon placeholders. By default this property is null, which means that the width of the Actions column is calculated based on the number of registered actions. |
TableActions | IList<ActionConfiguration> | Actions available for each item in the listing. See Add header and item actions. |
Listing pages need to specify the TemplateNames.LISTING client template during registration.
using Kentico.Xperience.Admin.Base;
[assembly: UIPage(
parentType: typeof(UsersApplication),
slug: "list",
uiPageType: typeof(UserObjectListing),
name: "Users",
templateName: TemplateNames.LISTING,
order: 0)]Listing pages must use the LISTING client template.
The template contains the following default page commands:
int identifier.