Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to display Content Fragments in UI.?

Avatar

Avatar
Validate 1
Level 2
imadullakhan
Level 2

Likes

5 likes

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Establish
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
imadullakhan
Level 2

Likes

5 likes

Total Posts

51 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Establish
Give Back
Boost 5
Boost 3
View profile
imadullakhan
Level 2

28-05-2020

Hi @All,

 

I have couple of Content Fragments which i need to show in UI. How to do this one. Can any one help me please? 

View Entire Topic

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

591 likes

Total Posts

572 posts

Correct Reply

219 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

591 likes

Total Posts

572 posts

Correct Reply

219 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

29-05-2020

@imadullakhan 

For content authoring, you can simply go to dam assets, and edit the content fragment; here you can edit content based on how your content fragment schema is setup.https://docs.adobe.com/content/help/en/experience-manager-64/developing/extending-aem/customizing-co...
To display content from the content fragment you can have several methods, but these are the popular methods that I've used in the past:

  1. Use the WCM Core Components, content fragment component https://docs.adobe.com/content/help/en/experience-manager-core-components/using/components/content-f...; there are some limitations, so you might need to extend the component as per your requirements. 
  2. Create your own component that consumes the content fragment. use the Granite UI, pathfield, to point to your content fragment, then using backend logic to expose properties to slightly via Sling Models.

API: When you want to expose Json to 3rd party services, you can utilise the WCM Core Component V2 Page, and also the WCM Core Component content fragment component, you can call model.json on the page, and see the basic structure of the content fragment values presented as the JSON response.

I hope this helps.