Customizing Experience Fragment Template properties

Avatar

Avatar
Level 1
DipakRShah
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
DipakRShah
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
DipakRShah
Level 1

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

484 likes

Total Posts

1,049 posts

Correct reply

121 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
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
Boost 50
Employee
surabhikatiyar
Employee

Likes

68 likes

Total Posts

46 posts

Correct reply

18 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Boost 50
Employee
surabhikatiyar
Employee

Likes

68 likes

Total Posts

46 posts

Correct reply

18 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 10
View profile
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
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
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
Boost 5
Level 2
vishakhav2
Level 2

Likes

10 likes

Total Posts

11 posts

Correct reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 3
View profile

Avatar
Boost 5
Level 2
vishakhav2
Level 2

Likes

10 likes

Total Posts

11 posts

Correct reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Affirm 3
View profile
vishakhav2
Level 2

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