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 render/style a content fragment (i.e. not using the plain text Content Fragment Component)

Avatar

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile
TB3dock
Level 4

24-03-2021

If you create a page, and drop in content fragment where you would drop in a component, it just creates a text version of the content fragment model.

If the model contains say title, image, description, reference, category, all these get dumped as plain text on the page.

Presumably, there is a way we can create a template/component which can take some of these fields, and lay them out and style them?

I have not been able to find any information on this (i.e. rendering a content fragment with a layout).

When we create the layout, we want to create it in code (not via CMS UI), so that it can be distributed to other envs (not just on the local env)

 

Presumably we can create a component to render the content fragment, but how do we associated them together, and how does one reference the other?

Replies

Avatar

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Boost 100
Level 7
rush_pawan
Level 7

Likes

120 likes

Total Posts

192 posts

Correct Reply

77 solutions
Top badges earned
Boost 100
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
rush_pawan
Level 7

24-03-2021

Hello,

 

The purpose of content fragment is to render agnostic. now to apply layout or rendering ui, its part of dev job and can be achieved multiple way similar as regular component development 

generate UI using native and third party api like react or similar (based on below models)

 

- export as JSON then process it as model while 

https://experienceleague.adobe.com/docs/experience-manager-64/developing/components/json-exporter.ht...

- or use GraphQL to get the JSON response

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/assets/admin/graphql-api-co... 

- or use DAM assets api (as last options)

Avatar

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile

Avatar
Ignite 10
Level 4
TB3dock
Level 4

Likes

34 likes

Total Posts

203 posts

Correct Reply

4 solutions
Top badges earned
Ignite 10
Boost 25
Give Back 25
Validate 10
Validate 1
View profile
TB3dock
Level 4

24-03-2021

We dont want to use content fragments - they are very limiting, but we understand that they must be used if we want to query the fields using graphql to display in a react app. however, we also need to show them on our website. We can easily create components, but not sure how to map a component to a content item in order to render it on a page from AEM.

Avatar

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rohit_Utreja
Level 4

25-03-2021