Who create a cq:siteVariant node?

Avatar

Avatar

diegob27480086

Avatar

diegob27480086

diegob27480086

09-08-2018

Is there any special process to create a cq:siteVariant node? Where can I find documentation about this node?

Accepted Solutions (1)

Accepted Solutions (1)

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

09-08-2018

Hi,

The PageVariantsProvider OSGi service is capable of generating alternate links for sites belonging to the same family. In order to configure sites to be taken into consideration by the service, a cq:siteVariant node has to be added to the jcr:content node from the root of the site.

The cq:siteVariant node needs to have the following properties:

  • cq:childNodesMapTo - determines to which attribute of the link element the child nodes will be mapped; it is recommended to organize the content of your website in such a way so that the children of the root node represent the root for a language variant of your global website (e.g. /content/mysite/en, /content/mysite/de), in which case the value of the cq:childNodesMapTo should be hreflang;
  • cq:variantDomain - indicates what Externalizer domain will be used to generate the page variants absolute URLs; if this value is not set then the page variants will be generated using relative links;
  • cq:variantFamily - indicates to which family of websites this site belongs; multiple device-specific representations of the same website should belong to the same family;
  • media - stores the values of the media attribute of the link element; it is recommended to use the name of the BrowserMap registered DeviceGroups, so that the BrowserMap library can automatically forward the clients to the correct variant of the website.

PageVariantsProvider and Externalizer

When the value of the cq:variantDomain property of a cq:siteVariant node is not empty, the PageVariantsProvider service will generate absolute links using this value as a configured domain for the Externalizer service. Make sure to configure the Externalizer service to reflect your setup.

Please find doc at Creating Sites for Mobile Devices

PageVariantsProvider ("The Adobe AEM Quickstart and Web Application.")

Thanks

Arun

Answers (1)

Answers (1)

Avatar

Avatar

diegob27480086

Avatar

diegob27480086

diegob27480086

09-08-2018

Thanks for your answer It was very helpful