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.

AEM 6.3- Content fragement original file data is not rendering properly on front end

Avatar

Level 3

Hi,

Problem statement:

In aem 6.3 , content fragement has a original file which contains the data (text and html) and displays it on the front end of content fragement.

I have the data present in both text and HTML in original file like

input -in original file

ID <This is my Id>

<p> this is a paragraph </p>

<img url="sourceurl">

So the front end output is

Output- in front end of content fragement

ID

this is a paragraph

   image

I want ID data as it is but the data is not getting displayed . Its blank in front of ID

Below is the expected output

expected output-in front end of content fragement

ID <This is my Id>

this is a paragraph

   image

As per my observation while displaying the data on front end aem considering "<" This as a HTML tag instead of a normal text and not rendering the data.

I want the data in expected output format.

Could you please help me in the scenario, if its possible to differentiate between HTML tag and normal angular brackets ?

or is there any other way to achieve the expected output?

Any help or suggestions on the above would be really appreciated

thanks

Ranjna

1 Reply

Avatar

Level 10

I would look at writing an HTL component that uses a component dialog (Granite resource types) and Sling Models - watch this Guided Journey  - Scott's Digital Community: Guided Journey for Using Granite Resources Types in Experience Manager Co...