Why does "Variation" option does not show up in a new Experience Fragment being built using default "HTML 5 Page" template that we're trying to create? While it shows if we use We.Retail's template? What are we missing?
2. And i do not see any Errors in browser (tried Chrome & Firefox)
Here's the issue/solution:
An "Experience Fragment" needs to be built in a certain way only.. as follows:
An Experience Fragment <-- Editable Template <-- Template Type that uses xfpage (like sling:resourceType="wknd/components/structure/xfpage"/> and the xfpage component should use sling:resourceSuperType="cq/experience-fragments/components/xfpage")
The name of the template need to be used for an XF should have the prefix "experience-fragment-<name>" [I didn't like this hard rule but the designers of this may have some reasons for this]
So if the XF is built using a Template (Editable) and Template Type which are built as above.. then the XF will show the Variations option.
NOTE: Adobe WKND (/conf/wknd/settings/wcm/template-types) demo site and OOTB Template - HTML5 Page (/libs/settings/wcm/template-types/html5page) do not have a Template Type built using xfpage and if you're trying to build a template using any of them.. XF's will not show the Varations option. Only We.Retail has those special XF based templates (and template types)
for naming it is not a hard rule to name template with experience-fragments, but it will help to avoid further changes to allow template but it is easy
The name of the template must begin with: experience-fragments This allows users to create experience fragments in /content/experience-fragments as the cq:allowedTemplates property of this folder includes all the templates that have names beginning with experience-fragment . Customers can update this property to include their own naming scheme or template locations.
Or:Add the template details manually in cq:allowedTemplates on the /content/experience-fragment node.