Expand my Community achievements bar.

SOLVED

Content fragment - servlet

Avatar

Level 4

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 !

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 8

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