Customizing Experience Fragment Template properties

Avatar

Avatar

DipakRShah

Avatar

DipakRShah

DipakRShah

10-06-2020

I see some document that explains how you could customize Page Template properties template. But I can't find any document that shows how to customize Experience Fragment Template Properties. 

 

We want to use some template properties to drive Template so we can reduce number of templates that differ just in terms of those properties.

Custom Field Experience Fragments Properties Templates

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

10-06-2020

Hi @DipakRShah 

 

    I assume you want to add some field to your page properties tab in XF pages !? If so you can do the below.

  1. Go to the page component of your XF

xf-1.JPG

 

 

 

 

 

 

 

  2. If you have a sling:resourceSuperType , go to the component, copy the cq:dialog structure and add the relevant fields like below

In my case , it is the OOTB XF component

xf-2.JPGxf-3.JPG

 

 

 

 

 

 

 

 

3. copy the dialog structure and add the relevant field. I will create a similar cq;dialog under my component till the items node

xf-4.JPG

 

4. Now create the required tab and fields , under this items node.

 

xf-5.JPG

 

 

 

 

 

 

 

 

Now open the XF page and check the page properties and you can see the fields you added

xf-6.JPG

 

 

Hope this is what you are looking for .

 

Thanks

Veena

Answers (3)

Answers (3)

Avatar

Avatar

surabhikatiyar

Employee

Avatar

surabhikatiyar

Employee

surabhikatiyar
Employee

11-06-2020

If you are using  the OOTB experience fragment with template name "Experience Fragment Web Variation" which has sling:resourceType=cq/experience-fragments/components/experiencefragment, then if you wish to add new properties to this Experience Fragment properties you can overlay the path below to add your own properties to the Experience Fragment template.

 

""/libs/cq/experience-fragments/components/experiencefragment/cq:dialog/content/items/tabs/items"

 

 

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

11-06-2020

Customizing the AEM XF template is the same as the page.

The super type of experience fragment page is /libs/cq/experience-fragments/components/xfpage.

 

Create a xf-page component in you project with the supertype /libs/cq/experience-fragments/components/xfpage

and copy the files which you want to modify.

 

 

 

 

Avatar

Avatar

vishakhav2

Avatar

vishakhav2

vishakhav2

10-06-2020

Hi @DipakRShah ,

You can hide few properties for those templates or render based on some specific condition.

Since your question pertains to limiting the properties. You can go for sling:hideChildren:[properties you dont require for that specific template]

 

Thanks,

Vishakha