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
BedrockMission!

Learn More

View all

Sign in to view all badges

How to add cq:xfVariantType to a Template for Experience Fragments?

Avatar

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
surenk
Level 2

12-09-2019

Issue: On AEM 6.4.. When trying to refer an Experience Fragment inside an "Experience Fragment Component" on a sites/page, the "experience fragments without any "cq:xfVariantType" property do not show up. The Experience fragment functions normal.

Screen Shot 2019-09-12 at 5.30.02 PM.png

Screen Shot 2019-09-12 at 5.30.14 PM.png

As of now we have added this via code but there is not way to add this property to the "editable template" other than via crx/de. And which is not a way we can recommend to customers while building editable templates.

Screen Shot 2019-09-12 at 5.27.50 PM.png

Screen Shot 2019-09-12 at 5.33.29 PM.png

Referred this: Configure cq:xfVariantType in experience fragment. and copied the property referring to We.Retail's "Experience Fragment Web Variation" template.

Is this an error with General > Experience Fragment component?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,153 posts

Correct Reply

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

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,153 posts

Correct Reply

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

14-09-2019

I believe you are creating experience fragment templates using experience fragment template type.

As a developer, you still need to create template type and there you can add cq:xfVariantType property in initial content.

whenever you will create new xf template using xf template type, cq:xfVariantType property will be added to new templates.

e.g.

/conf/we-retail/settings/wcm/template-types/empty-xf-page/initial/jcr:content

Answers (6)

Answers (6)

Avatar

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Ignite 1
Employee
aemmarc
Employee

Likes

183 likes

Total Posts

243 posts

Correct Reply

92 solutions
Top badges earned
Ignite 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
aemmarc
Employee

13-09-2019

The cq:xfVariantType {String} web property must be set on the initial template for it to show up.

/conf/<your_organization>/settings/wcm/templates/experience-fragment-web-variation/initial/jcr:content

The templates must be allowed via the cq:allowedTemplates property set at the root jcr:content node of the site.

/content/<your_site>/jcr:content

/conf/<your_organization>/settings/wcm/templates/.*

Avatar

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
surenk
Level 2

18-09-2019

Thanks Arun Patidar.

For reference, i've added the code/fix to WKND here Enabling Users to build Experience Fragments - Added Empty XF Template Type and Sample Template and ...

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,153 posts

Correct Reply

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

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,275 likes

Total Posts

3,153 posts

Correct Reply

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

18-09-2019

Thanks surenk for sharing this.

Avatar

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
surenk
Level 2

13-09-2019

Thanks Vish.dhaliwal we were able to identify that XF needs that property from this post. Only We.Retail example had this and is not documented anywhere on the documentation pages. Or if it is, i'm missing it.

Avatar

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
surenk
Level 2

Likes

9 likes

Total Posts

46 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
surenk
Level 2

13-09-2019

Yes, i agree and adding them did solve the problem. But this has to be done via Code or crx/de and not via AEM UI.

When users/template-authors are building an Editable template on the AEM UI.. they cannot use them unless a "developer" is involved.

So i see the process as..

  • Build an editable template in AEM
  • Make a package out of it
  • Import that package into codebase, add the "cq:xfVariantType" property and deploy it back to AEM again.

Something is not correct here?

Avatar

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

187 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Vish_dhaliwal
Employee

Likes

187 likes

Total Posts

356 posts

Correct Reply

123 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Vish_dhaliwal
Employee

13-09-2019