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

Experience Fragment template and template-type

Avatar

Level 3

Hello,

Is there any good tutorial about Experience Fragments variation (template/model) creation?

Let me explain my problem. When I try to create a new Experience Fragment, I can only see and pick up "Facebook", "Pinterest" and "We.Retail" variations (models). So, with this, I realized that I need to create my own variation, my own model. There is a tutorial that shows a variation called "HTML5 Experience Fragment Web Template", but unfortunately I don't have it available in my AEM instance. So, I need to create my own...

I've been going through We Retail code and saw that I need at least the following to have my own experience fragment variation:

a) To create a page component;

b) To create a template-type;

c) To create a template.

I've copied code from We Retail, adapted it, but I couldn't make it appear in the list of available experience fragment variations (when creating a new one).

I've searched a lot on Google and couldn't find any tutorial that explains how to do that....

Do you guys know any page or doc that shows how to do it?

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

I had the same question.

You can try:

1. Create your template

Step1.jpg

2. Using crx-de, locate your template:

Step2.jpg

3. From XF view, click settings to add the location:

Step3.jpg

4.Your template should display like this:

Step4.jpg

Let me know your updates.

Chris

View solution in original post

5 Replies

Avatar

Community Advisor

configure.png

Hello,

If you are using Aem 6.4, Beside create button, you can see configure option, once you click it, you can see the allowed templates for the experience fragments. All Editable Templates can be added here.

Avatar

Level 10

There is no advantage of creating a custom one - if you use the available ones - they will still show up in your project.

Avatar

Level 3

Thank you shashi1223 I haven't noticed this gear button.

smacdonald2008​ I will have to create a new one because there are only three options available:

- Facebook Experience Fragment

- Pinterest Experience Frament

- We Retail Experience Fragment

I never changed the gear button configuration, and there are two lines there:

- /libs/cq/experience-fragments/components/experiencefragment

- /conf/we-retail/settings/wcm/templates/experience-fragment(.*)?

Maybe I am missing a configuration here...

Avatar

Correct answer by
Level 2

Hi,

I had the same question.

You can try:

1. Create your template

Step1.jpg

2. Using crx-de, locate your template:

Step2.jpg

3. From XF view, click settings to add the location:

Step3.jpg

4.Your template should display like this:

Step4.jpg

Let me know your updates.

Chris