Alerts Component using content fragment | Community
Skip to main content
Level 2
Jun 20, 2022 3:36 PM UTC
Solved

Alerts Component using content fragment

I have to create Alerts Component using  Content fragments to load Alerts via XF how can I do that ?

 

Thank You

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
B_Sravan
B_SravanAccepted solution
New Participant
Jun 21, 2022 5:19 AM UTC

Hi @teju_8 ,

A few steps to do.

1. Get ready with your html, css and component dialog

2. Add your css/js to a client library(to the appropriate existing one) and refer them in to your template.

3. Create a content fragment and add your component to the content fragment.

4. Add your content fragment to your page or to the template structure.

more on content fragments: https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/content-fragments-feature-video-use.html 

 

more on component development: https://experienceleague.adobe.com/docs/experience-manager-64/developing/components/components-basics.html?lang=en 

 

Thank you.

Regards,

Sravan

4 replies

B_Sravan
B_SravanAccepted solution
New Participant
Jun 21, 2022 5:19 AM UTC

Hi @teju_8 ,

A few steps to do.

1. Get ready with your html, css and component dialog

2. Add your css/js to a client library(to the appropriate existing one) and refer them in to your template.

3. Create a content fragment and add your component to the content fragment.

4. Add your content fragment to your page or to the template structure.

more on content fragments: https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/content-fragments-feature-video-use.html 

 

more on component development: https://experienceleague.adobe.com/docs/experience-manager-64/developing/components/components-basics.html?lang=en 

 

Thank you.

Regards,

Sravan

Translate
SantoshSai
New Participant
Jun 21, 2022 1:24 AM UTC

Hi @teju_8 ,

You can implement that in the frontend code considering component, a component which alerts are all based on css class like popup, warnings etc.

One of the approach could be,

  • Set a variable for css class and the message which can be from Content Fragment/XF(If it's common throughout the site) and then display the content fragment message in html.

Hope that helps you!

Regards,

Santosh

Translate
Santosh Sai
ShaileshBassi
New Participant
Jun 20, 2022 6:17 PM UTC

@teju_8 Yes, you can create any custom component via XF.

But did not get your question, how do to want to use the content fragment over here.

Thanks

Translate
Teju_8Author
Level 2
Jun 28, 2022 11:00 AM UTC

Actually in our requirement we want to show alert on website through content fragment.  

Translate