Skip to content

Files

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 1, 2019
Sep 15, 2022
Mar 7, 2025
Nov 5, 2020
May 22, 2020
May 1, 2019
Jan 27, 2025
Aug 30, 2019
Aug 30, 2019
Aug 30, 2019
Jan 19, 2021

Content Fragment (v1)

Content Fragment component written in HTL that displays the elements of a Content Fragment or a selection thereof.

Features

  • Displays the elements of a Content Fragment as an HTML description list
  • By default renders all elements of a Content Fragment
  • Can be configured to render a subset of the elements in a specific order
  • Alternative Content Fragment variations are configurable

Use Object

The Content Fragment component uses the com.adobe.cq.wcm.core.components.models.contentfragment.ContentFragment Sling model as its Use-object.

Edit dialog properties

The following JCR properties are used:

  1. ./fragmentPath - defines the path to the Content Fragment to be rendered
  2. ./variationName - defines the variation to use to render the elements (optional: if not present, the master variation is used)
  3. ./elementNames - multi-valued property defining the elements to be rendered and in which order (optional: if not present, all elements are rendered)
  4. ./paragraphScope - defines if all or a range of paragraphs are to be rendered (only used in paragraph mode)
  5. ./paragraphRange - defines the range(s) of paragraphs to be rendered (only used in paragraph mode and if paragraphs are restricted to ranges)
  6. ./paragraphHeadings - defines if headings should count as paragraphs (only used in paragraph mode and if paragraphs are restricted to ranges)
  7. ./id - defines the component HTML ID attribute.

BEM description

BLOCK cmp-contentfragment
  MOD cmp-contentfragment--<name>
    ELEMENT cmp-contentfragment__title
    ELEMENT cmp-contentfragment__description
    ELEMENT cmp-contentfragment__elements
    ELEMENT cmp-contentfragment__element
        MOD cmp-contentfragment__element--<name>
    ELEMENT cmp-contentfragment__element-title
    ELEMENT cmp-contentfragment__element-value

Information