Content Fragment Listv2

Content Fragment List allows the display of a list of content fragments on a page. Useful for authoring headless content that can be easily consumed by applications.

Examples

Standard

Content fragment list component that displays content fragments based on a bespoke Office  model which allows the output of structured data associated with a business location or office. A Parent Path is used as a root for looking up the content fragments to display.

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
Street Address
Barfüsserplatz 6
City
Basel
Postal Code
CH-4051
Country
Switzerland
Region
core-components-examples:region/europe-middleeast-africa
  1. modelPath: /conf/core-components-examples/settings/dam/cfm/models/office
  2. parentPath: /content/dam/core-components-examples/library/sample-assets
  3. sling:resourceType: core-components-examples/components/contentfragmentlist
    
        

    

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
Street Address
Barfüsserplatz 6
City
Basel
Postal Code
CH-4051
Country
Switzerland
Region
core-components-examples:region/europe-middleeast-africa

Tags

The list can be filtered to display content fragments associated with a tag. In this example, the list is filtered by the core-components-examples:region/north-america tag - to show offices in North America.

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america
  1. modelPath: /conf/core-components-examples/settings/dam/cfm/models/office
  2. tagNames: core-components-examples:region/north-america
  3. parentPath: /content/dam/core-components-examples/library/sample-assets
  4. sling:resourceType: core-components-examples/components/contentfragmentlist
    
        

    

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america

Order By and Sort Order

The list can be ordered by element or property, ascending or descending. In this example, we order the offices by City, ascending.

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
Street Address
Barfüsserplatz 6
City
Basel
Postal Code
CH-4051
Country
Switzerland
Region
core-components-examples:region/europe-middleeast-africa

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america
  1. modelPath: /conf/core-components-examples/settings/dam/cfm/models/office
  2. orderBy: jcr:content/data/master/city
  3. parentPath: /content/dam/core-components-examples/library/sample-assets
  4. sortOrder: asc
  5. sling:resourceType: core-components-examples/components/contentfragmentlist
    
        

    

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
Street Address
Barfüsserplatz 6
City
Basel
Postal Code
CH-4051
Country
Switzerland
Region
core-components-examples:region/europe-middleeast-africa

Adobe San Francisco

Title
Adobe San Francisco
Street Address
601 Townsend Street
City
San Francisco
Postal Code
94103
Country
USA
Region
core-components-examples:region/north-america

Adobe Headquarters

Title
Adobe Headquarters
Street Address
345 Park Avenue
City
San Jose
Postal Code
95110-2704
Country
USA
Region
core-components-examples:region/north-america

Elements

The content fragment elements to be displayed in the list can be configured by an author. In this example we again list the same offices, but filter the output to only show the title and city.

Adobe Headquarters

Title
Adobe Headquarters
City
San Jose

Adobe San Francisco

Title
Adobe San Francisco
City
San Francisco

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
City
Basel
  1. modelPath: /conf/core-components-examples/settings/dam/cfm/models/office
  2. elementNames: title,city
  3. parentPath: /content/dam/core-components-examples/library/sample-assets
  4. sling:resourceType: core-components-examples/components/contentfragmentlist
    
        

    

Adobe Headquarters

Title
Adobe Headquarters
City
San Jose

Adobe San Francisco

Title
Adobe San Francisco
City
San Francisco

Adobe Research Schweiz AG

Title
Adobe Research Schweiz AG
City
Basel