The site model and the sites service are strongly connected with each other. While the site model consists of properties defining the site structure, the sites service uses this model to work with sites programmatically.
Sites Service
The sites service is designed to access the available sites and to determine the relation between sites and contents. The site model configures the behavior of the sites service.
For developing multi-site features the main entry point is the sites service.
Site Model
The site model is the centralized configuration of the CoreMedia Multi-Site behavior. Its configuration is required in several applications which are listed below. While section Site Model Properties lists the configurable properties (exception: CoreMedia Site Manager with an extra description in Site Model in CoreMedia Site Manager) the different configuration locations are explained per application:
Site Model Properties
The following table illustrates the configurable site model properties. To get to know more about the properties and patterns used, consult the Javadoc of com.coremedia.cap.multisite.SiteModel.
sitemodel.site.indicator.documentType
| |
Description |
Specifies the content type of the site indicator document. Each site must only have one instance of that content type. |
Default Value |
CMSite
|
sitemodel.site.indicator.depth
| |
Description |
Defines the depth under the root of the site folder, where the site indicator document resides. |
Default Value | 1 |
sitemodel.site.indicator.namePattern
| |
Description |
Name pattern, which will be used for the name of the site indicator document
when deriving a site.
Only placeholder |
Default Value |
{0} [Site]
|
sitemodel.site.rootdocument.namePattern
| |
Description |
Defines the pattern for the site's home page document name, used while
deriving a site.
Only placeholder |
Default Value |
{0}
|
sitemodel.site.manager.groupPattern
| |
Description |
Defines the pattern for responsible default site manager group name when deriving a site. For available placeholders see Table 6.20, “Placeholders for Site Model Configuration” |
Default Value |
manager-{4}
|
sitemodel.siteManagerGroupProperty
| |
Description |
Defines the property of the site indicator document holding the site manager group name. |
Default Value |
siteManagerGroup
|
sitemodel.translationManagerRole
| |
Description |
Defines the group name denoting the role which permits a user to start a translation workflow. |
Default Value |
translation-manager-role
|
sitemodel.idProperty
| |
Description |
Defines the property of the site indicator document which contains the site id. |
Default Value |
id
|
sitemodel.nameProperty
| |
Description |
Defines the property of the site indicator document which contains the site name. |
Default Value |
name
|
sitemodel.localeProperty
| |
Description |
Defines the property of translatable content and the site indicator document, which holds the locale of the content. |
Default Value |
locale
|
sitemodel.masterProperty
| |
Description |
Defines the property of translatable content and the site indicator, which contains the link the master document. |
Default Value |
master
|
sitemodel.masterVersionProperty
| |
Description |
Defines the property of translatable content, which contains the version the corresponding master document. |
Default Value |
masterVersion
|
sitemodel.rootProperty
| |
Description |
Defines the property of the site indicator document, which refers to the home page document of this site. |
Default Value |
root
|
sitemodel.uriSegmentProperty
| |
Description |
Defines the property of the site's home page content type, which defines the root URI segment of the site. |
Default Value |
segment
|
sitemodel.uriSegmentPattern
| |
Description |
Defines the pattern for the default root URI segment when deriving a site. For available placeholders see Table 6.20, “Placeholders for Site Model Configuration”. |
Default Value |
{0}-{4}
|
sitemodel.rootFolderPathPattern
| |
Description |
Defines the pattern to determine the site folder for a new derived site. For available placeholders see Table 6.20, “Placeholders for Site Model Configuration”. |
Default Value |
/Sites/{0}/{6}/{5}
|
sitemodel.rootFolderPathDefaultCountry
| |
Description |
Defines the folder name for the country folder, if the locale chosen while deriving a site defines no country explicitly. |
Default Value |
NO_COUNTRY
|
sitemodel.translationWorkflowRobotUser
| |
Description |
Defines the user name of the user responsible for creating derived content during a translation workflow.
|
Default Value |
translation-workflow-robot
|
Table 6.19. Properties of the Site Model
Site Model Placeholders
Placeholder | Description | Example |
---|---|---|
{0}
| site name |
MySite
|
{1}
| site locale's language code |
en
|
{2}
| site locale's country code (defaults to language code, if not available) |
US
|
{3}
| site locale's variant (defaults to country or language code, if not available); using BCP 47 Extensions |
u-cu-usd
|
{4}
| site locale's IETF BCP 47 language tag |
en-US-u-cu-usd
|
{5}
|
site locale's language display name (localized in U.S. English); only available for
sitemodel.rootFolderPathPattern
|
English
|
{6}
|
site locale's country display name (localized in U.S. English); only available for
sitemodel.rootFolderPathPattern
|
United States
|
{7}
|
site locale's variant with the prefix variantPrefix configured in site model's
Spring context; defaults to empty String; only available for
sitemodel.rootFolderPathPattern . See
IANA Language Subtag Registry
for valid registered variants.
|
_arevela
|
Table 6.20. Placeholders for Site Model Configuration
Application Configurations
For details of the configuration in every application, please read the documentation below.
CoreMedia Studio
The site model default properties can be adjusted in the application.properties
file in the
src/main/webapp/WEB-INF
directory of the studio-webapp
module.
See Chapter 3, Deployment in CoreMedia Studio Manual for further information.
Content Management Server
The site model default properties can be adjusted in the application.properties
file in the
src/main/webapp/WEB-INF
directory of the
content-management-server-webapp
module.
See Section 3.1, “Structure of Content Server Installation” in CoreMedia Content Server Manual for further information.
Content Application Engine
The site model default properties can be adjusted in the component-blueprint-cae.properties
file in the src/main/resources/META-INF/coremedia
directory of the
cae-base-component
module. Thus, the configuration applies to the Live CAE as well
as to the Preview CAE.
See CoreMedia Content Application Developer Manual for further information.
Command Line Tools
The site model default properties can be adjusted in the commandline-tools-sitemodel.properties
file in the properties/corem
directory of the cms-tools-application
module.
CoreMedia Site Manager
The Site Manager provides only rudimentary support of the multi-site features especially for backwards compatibility to old CoreMedia systems. For the full set of features please use CoreMedia Studio.
To migrate from existing multi-site features of Site Manager you need to adapt the
editor.xml
for example by adding a SiteModel
.
Example 6.21, “SiteModel in editor.xml
” shows an example for adding the SiteModel
to
editor.xml
.
<Editor> <!-- ... --> <SiteModel siteIndicatorDocumentType="CMSite" siteIndicatorDepth="1" idProperty="id" rootProperty="root" masterProperty="master" localeProperty="locale"/> <!-- ... --> </Editor>
Example 6.21. SiteModel in editor.xml
Mind that for changing property names of master
and masterVersion
you also need to
adapt property editors for the versioned master reference as shown in
Example 6.22, “Versioned Master Link in editor.xml
”.
<Document type="..." viewClass="..."> <!-- ... --> <Property name="master" editorClass="hox.corem.editor.toolkit.property.VersionLinkEditor" versionProperty="masterVersion"/> <Property name="masterVersion" editorClass="hox.corem.editor.toolkit.property.InvisibleEditor"/> <!-- ... --> </Document>
Example 6.22. Versioned Master Link in editor.xml