List Component

Class Name

The List Component is implemented by the following class:

org.onehippo.cms7.essentials.components.EssentialsListComponent

Overview

The List Component executes queries on documents stored in the repository and exposes the results to the rendering template. You can configure the query using component parameters to match your requirements.

You can extend this component to customize query logic. The Essentials News Component and Essentials Event Component are examples of specialized list components built on top of the List Component.

The component supports pagination. Results are provided as a pageable object, which includes the page size and current page number.

You can use the List Component with facet navigation by specifying a facet navigation node in the path parameter. Customized queries may not always be compatible with facet navigation.

Component Parameters

NameDescription
pathRepository path to a folder or facet navigation node, relative to the site root folder. This determines the scope (queried repository sub-tree) of the query. If not set or empty, the component uses the repository node identified by the current request URL and site map as the scope.
documentTypesComma-separated list of JCR primary node types to search. Refer to your available CNDs for valid values. If not specified, the query is not restricted by node type.
includeSubtypesIndicates whether sub-types of the specified document types should be included. This flag is currently unused; sub-types are always included.
queryFree-text query string. The fields searched depend on your indexing configuration. This parameter can be overridden by a request parameter.
sortFieldName of the repository node attribute to sort results by. Check the document type's bean or the CMS Document Type Editor for valid values. When searching multiple document types, use an attribute common to all. This parameter has no effect if the query scope is a faceted navigation node.
sortOrderSorting order: "desc" or "asc". Defaults to descending. This parameter has no effect if the query scope is a faceted navigation node.
page1-based integer for the requested page. Defaults to 1 if not specified. Can be overridden by a request parameter.
pageSizeMaximum number of results per page. Defaults to 10.
showPaginationIndicates whether the rendering template should display pagination controls. The component passes this value through to the template.

Request Parameters

NameDescription
queryFree-text query string. Does not work when the query scope is a facet navigation node. Overrides the component parameter.
page1-based integer for the requested page. Defaults to 1 if not specified. Overrides the component parameter.

Rendering Attributes

NameTypeDescription
queryjava.lang.StringNormalized free-text query string from the request or component parameter.
pageableorg.onehippo.cms7.essentials.components.paging.PageablePageable collection of HippoBeans for the requested page. The collection also provides the page size and current page number. May be null if the query execution fails.
Share Feedback
Page: /frontend/standard-components/list-component
Section: Frontend
Category *
List Component | Bloomreach Content Documentation