Expand my Community achievements bar.

SOLVED

Customizing Experience Fragment Template properties

Avatar

Level 1

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.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 2

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

Avatar

Employee Advisor

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

Community Advisor

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.

 

 

 

 



Arun Patidar