Skip to main content
Level 4
May 22, 2018
Risolto

Content fragment - servlet

  • May 22, 2018
  • 2 risposte
  • 2731 visualizzazioni

Hi guys,

I'm using AEM 6.2. Long story short, I have a servlet which sends a registration success email.

It's that possible to use a content fragment as a way for the author to modify the text template for my email ?
For now the email text template is hardcoded into the registration servlet.

Thank you !

Questo argomento è stato chiuso alle risposte.
Migliore risposta di Hemant_arora

You can use the Content Fragment Manager API to fetch the content of the content fragment.

ContentFragmentManager ("The Adobe AEM Quickstart and Web Application.")

ContentFragment ("The Adobe AEM Quickstart and Web Application.")

Here is an example: Use this code in your servlet

Customizing and Extending Content Fragments

2 risposte

Hemant_arora
Hemant_aroraRisposta
Level 8
May 22, 2018

You can use the Content Fragment Manager API to fetch the content of the content fragment.

ContentFragmentManager ("The Adobe AEM Quickstart and Web Application.")

ContentFragment ("The Adobe AEM Quickstart and Web Application.")

Here is an example: Use this code in your servlet

Customizing and Extending Content Fragments

smacdonald2008
Level 10
May 22, 2018

Great answer!