The following example configuration is based on the Geometrixx website that comes per default with an AEM installation. The Geometrixx website is already multilingual and serves perfectly as an example.
The goal is to configure these mappings:
----------------------------------------------------------------
Domain Content branch
Domain Content branch
----------------------------------------------------------------
www.geometrixx.fr /content/geometrixx/fr
www.geometrixx.de /content/geometrixx/de
www.geometrixx.fr /content/geometrixx/fr
www.geometrixx.de /content/geometrixx/de
----------------------------------------------------------------
These nodes have to be created in the default workspace of the repository via the CRX Content Explorer, required nodetypes in brackets:
2 mappings are required:
map the root context to the index-page of the language branch, e.g. www.geometrixx.fr --> /content/geometrixx/fr.html
map resources to the corresponding language branch
Following is the JSON representation of the configuration necessary to map these 2 domains (/etc/map/http.tidy.-1.json):
{
"jcr:primaryType": "sling:OrderedFolder",
"www_geometrixx_fr": {
"sling:internalRedirect": [
"/content/geometrixx/fr.html"
],
"jcr:primaryType": "sling:Mapping",
"sling:match": "www.geometrixx.fr/$"
},
"www.geometrixx.fr": {
"sling:internalRedirect": [
"/content/geometrixx/fr",
"/"
],
"jcr:primaryType": "sling:Mapping"
},
"www_geometrixx_de": {
"sling:internalRedirect": [
"/content/geometrixx/de.html"
],
"jcr:primaryType": "sling:Mapping",
"sling:match": "www.geometrixx.de/$"
},
"www.geometrixx.de": {
"sling:internalRedirect": [
"/content/geometrixx/de",
"/"
],
"jcr:primaryType": "sling:Mapping"
}
}
These nodes have to be created in the default workspace of the repository via the CRX Content Explorer, required nodetypes in brackets:
/etc
/map (sling:Folder)
/http (sling:OrderedFolder)
/www_geometrixx_fr (sling:Mapping)
/www.geometrixx.fr (sling:Mapping)
/www_geometrixx_de (sling:Mapping)
/www.geometrixx.de (sling:Mapping)
map the root context to the index-page of the language branch, e.g. www.geometrixx.fr --> /content/geometrixx/fr.html
map resources to the corresponding language branch
Following is the JSON representation of the configuration necessary to map these 2 domains (/etc/map/http.tidy.-1.json):
{
"jcr:primaryType": "sling:OrderedFolder",
"www_geometrixx_fr": {
"sling:internalRedirect": [
"/content/geometrixx/fr.html"
],
"jcr:primaryType": "sling:Mapping",
"sling:match": "www.geometrixx.fr/$"
},
"www.geometrixx.fr": {
"sling:internalRedirect": [
"/content/geometrixx/fr",
"/"
],
"jcr:primaryType": "sling:Mapping"
},
"www_geometrixx_de": {
"sling:internalRedirect": [
"/content/geometrixx/de.html"
],
"jcr:primaryType": "sling:Mapping",
"sling:match": "www.geometrixx.de/$"
},
"www.geometrixx.de": {
"sling:internalRedirect": [
"/content/geometrixx/de",
"/"
],
"jcr:primaryType": "sling:Mapping"
}
}
No comments:
Post a Comment
If you have any doubts or questions, please let us know.