List component written in HTL that renders a configurable collection of items or content.
- Multiple sources:
- List page children
- List tagged items
- List query result
- List static items
- Ordering and limit
- Styles
The List component uses the com.adobe.cq.wcm.core.components.models.List
Sling model as its Use-object.
The following configuration properties are used:
./dateFormat
- defines the formatting string for when the list items are set to render their last modification date;./disableChildren
- allows to disable the ability to build a list from the child pages of a root page./disableStatic
- allows to disable the ability to build a list with static elements./disableSearch
- allows to disable the ability to build a list using search results./disableTags
- allows to disable the ability to build a list using the tagged child pages of a root page
The following properties are written to JCR for this List component and are expected to be available as Resource
properties:
./listFrom
- defines the source of this List; possible values:
children
- the list is built from the child pages of a root pagestatic
- the list is built from a statically defined collection of pagessearch
- the list is built from the search results of a querytags
- the list is built from the tagged children pages of a root page
./parentPage
- defines the root page when the./listFrom
property is set tochildren
./childDepth
- defines the max depth for children pages, when the./listFrom
property is set tochildren
./pages
- defines the pages to be rendered, when the./listFrom
property is set tostatic
./query
- defines the search query, when the./listFrom
property is set tosearch
./searchIn
- defines where to start the search, when the./listFrom
property is set tosearch
./tagsSearchRoot
- defines the root path of the tag search, when the./listFrom
property is set totags
./tags
- defines the tags list to search for, when the./listFrom
property is set totags
./tagsMatch
- defines if the results of the tag search have to match all tags or just some of them, when the./listFrom
property is set totags
; possible values:any
andall
./orderBy
- defines what criterion is used for ordering the list items: the item's title or the last modification date of the item; possible values:title
,modified
./sortOrder
- defines the sorting order; possible values:asc
,desc
./maxItems
- defines the maximum number of items rendered by the list./linkItems
- if set totrue
the list will link all items to the corresponding pages./showDescription
- if set totrue
each item's description will be rendered./showModificationDate
- if set totrue
each item's last modification date will be rendered./id
- defines the component HTML ID attribute.
The component provides a core.wcm.components.list.v2.editor
editor client library category that includes JavaScript
handling for dialog interaction. It is already included by its edit dialog.
BLOCK cmp-list
ELEMENT cmp-list__item
ELEMENT cmp-list__item-link
ELEMENT cmp-list__item-title
ELEMENT cmp-list__item-date
- Vendor: Adobe
- Version: v2
- Compatibility: AEM 6.3
- Status: production-ready
- Documentation: https://www.adobe.com/go/aem_cmp_list_v2
- Component Library: https://www.adobe.com/go/aem_cmp_library_list