Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

how to build custom data type model for content fragment to pull the content from Rest APi and display multiField

Avatar

Level 2

Hi All,

 

I have a requirement to display some alert message on the AEM website using Content Fragments. Author can create content fragment byusing model. Model should contains fields like alert related fields info like message title, message desc, start date, end on, country list,region list (based on country selection regins should display)and pages info. Author choose the country or page to display message and save. Upon save i need to enable message in all the specifc pages.

1. It would be helpful if I can load dynamic coutry list in the dropdown would be helpfull or is there any easy to implement this in AEM. please provide suggestions.

 

2. Is it good practise to customize jsp in CF. Is there any impact on future upgrade becasue Adobe almost ending supporting JSP?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

why do you want to do with CF but not XF?

XF provides more flexibility then CF.



Arun Patidar

View solution in original post

7 Replies

Avatar

Correct answer by
Community Advisor

why do you want to do with CF but not XF?

XF provides more flexibility then CF.



Arun Patidar

Avatar

Level 2
i want to display alert messages without caching. FE react JS application has to consume JSON to display message on webpages.

Avatar

Level 2
I am looking to create multiple message and export data to FE application.

Avatar

Community Advisor
you can expose XF as json as well. I have seen limitation while using CF that's why I am recommending XF. In XF you can add custom components(alert component) and expose as json using custom selector. you can avoid caching as well using QS.


Arun Patidar

Avatar

Level 2
Thank you Arun for the reply. I am looking to apply below features.

Avatar

Level 2
Thank you Arun for the reply. I am looking to apply below features. 1. Create multiple alert message and export json to FE application. 2. translate content to required languages. 2. avoid caching to experence fragments. can I achive all these above features with EX it will be good. Also would you explaine how to avoid caching for ex will really help me in implementing functionalites.

Avatar

Level 2
I went trough XF documentation and I see we can only export as html content. How to export it as JSON?