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

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

arunaaems506124
Level 2
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
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

XF provides more flexibility then CF.

View solution in original post

7 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

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

XF provides more flexibility then CF.

View solution in original post

arunaaems506124
Level 2
Level 2
i want to display alert messages without caching. FE react JS application has to consume JSON to display message on webpages.
arunaaems506124
Level 2
Level 2
I am looking to create multiple message and export data to FE application.
Arun_Patidar
Community Advisor
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.
arunaaems506124
Level 2
Level 2
Thank you Arun for the reply. I am looking to apply below features.
arunaaems506124
Level 2
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.
arunaaems506124
Level 2
Level 2
I went trough XF documentation and I see we can only export as html content. How to export it as JSON?