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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

When Iam Creating FAQ Feature in CF Component It appearing in json format like below

Avatar

Level 2

SYED1111_0-1672742421599.png

How to render it as Normal format

Any Suggestions for this

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @SYED1111 ,

 

After seeing the above snapshots I think it might be your component rendering script (HTML) which is writing the content in JSON format as the content fragment are using separate fields for the question and answer.

 

Can you please share the HTML code snippet of the component which you are using to fetch the content fragment data?

 

OOTB core content fragment component will only list down the content on the page itself. It will not render the content as JSON.

 

There might be some customization done in the component rendering script. Please do share the snippet.

 

Thanks,

Ravi Joshi

View solution in original post

5 Replies

Avatar

Community Advisor

If you're using json format data in content fragments, then you will not have control on change the format at page level. Alternatively, Instead of using single field for FAQ json, you may try creating CF model with multiple fields (Question & Answers) and use it on page level. 

 

Please check below incase if you want to explore on experience fragments as well. 

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/understand-... 

Avatar

Level 2

I dont want to render content in json format . i want to render content as normal for all Qusn and Ans

Avatar

Level 5

Hi @SYED1111 ,

 

Can you please share snaps of your content fragment or the content fragment model?

 

As suggested by @Siva_Sogalapalli if you are using JSON data in your "content fragment model" then you cannot segregate the JSON entries directly at the HTML level.

 

If you want to load questions and answers separately on the page. I would suggest using two different fields in the "content fragment model" if you are currently not using the same.

 

Thanks,

Ravi Joshi

 

 

 

Avatar

Level 2

SYED1111_0-1672842334631.png

This is Content Fragment for FAQ

 

SYED1111_1-1672842416526.png

This one content fragment Model

SYED1111_2-1672842453532.png

The Cf is Showing like Above 

My Requirment is when we click on Particuler Topic The particuler qus should appear under the categeory

Avatar

Correct answer by
Level 5

Hi @SYED1111 ,

 

After seeing the above snapshots I think it might be your component rendering script (HTML) which is writing the content in JSON format as the content fragment are using separate fields for the question and answer.

 

Can you please share the HTML code snippet of the component which you are using to fetch the content fragment data?

 

OOTB core content fragment component will only list down the content on the page itself. It will not render the content as JSON.

 

There might be some customization done in the component rendering script. Please do share the snippet.

 

Thanks,

Ravi Joshi