Blueprint Developer Manual / Version 2101
Table Of ContentsWhile you might create your very own content type model, the following description is based on the assumption that you use the content type model of CoreMedia Blueprint. For a custom content type model you must meet certain requirements which are described at the end of this section.
Content Types
The base content type for any contents which require to be translated is
CMLocalized
. For further information see Section 7.1, “Content Type Model”.
<DocType Name="CMLocalized" Parent="CMObject" Abstract="true"> <StringProperty Name="locale" Length="64"/> <LinkListProperty Name="master" Max="1" LinkType="CMLocalized" extensions:weakLink="true"/> <IntProperty Name="masterVersion"/> ... </DocType>
Example 5.12. CMLocalized
Weak Link Attribute
The contents of each site have to be published and withdrawn independently of their master.
Therefore, the weakLink
attribute of every master property must be set to true -
see also Content Type Model - LinkListProperty in Content Server Manual.
Attributes for Translation
The attributes extensions:translatable
and
extensions:automerge
, which can be attached to all properties, affect the
translation behavior. extensions:automerge
also affects the
synchronization behavior.
Translatable Properties
The properties that have to be translated to derived sites are marked as translatable in the
content type model by attaching the extensions:translatable
attribute to the
property declaration - see also
Content Type Model - Translatable Properties in Content Server Manual.
<DocType Name="CMTeasable" Parent="CMHasContexts" Abstract="true"> <LinkListProperty Name="master" Max="1" LinkType="CMTeasable" Override="true" extensions:weakLink="true"/> <StringProperty Name="teaserTitle" Length="512" extensions:translatable="true"/> <XmlProperty Name="teaserText" Grammar="coremedia-richtext-1.0" extensions:translatable="true"/> <XmlProperty Name="detailText" Grammar="coremedia-richtext-1.0" extensions:translatable="true"/> ... </DocType>
Example 5.13. CMTeasable
Automatically Merged Properties
Usually all non-translatable properties in the master content will be applied automatically to
the derived content when a translation task is accepted. This helps to keep binary and
structural data in sync between sites, such as images, crops, settings, and the navigation
hierarchy, and complements the XLIFF-based update of translatable properties. To enable the
automatic merge for a translatable property or disable the automatic merge for a
non-translatable property the extensions:automerge
attribute has to be
attached.
For a synchronization workflow, all properties are synchronized, by default, between a master
content and its derived content. You can disable this behavior by setting
extensions:automerge
to false or by unchecking the checkbox
Keep synchronized with Master of the content in Studio (see
Section 4.7.5.3, “Removing Content Permanently from Synchronization” in Studio User Manual for details).
<DocType Name="CMSettings" Parent="CMLocalized"> <LinkListProperty Name="master" Max="1" LinkType="CMSettings" Override="true" extensions:weakLink="true"/> <XmlProperty Name="settings" Grammar="coremedia-struct-2008" extensions:translatable="true" extensions:automerge="true"/> <StringProperty Name="identifier" Length="100"/> </DocType>
Example 5.14. CMSettings
Interaction of translation attributes
Both attributes have no effect when you derive a site. A derived site is a complete copy of the master site. Only links are changed, so that they point to content in the derived site and not to content in the master site.
However, the attribute extensions:translatable
influences the effect of
the extensions:automerge
attribute during translation, as is shown in
Table 5.22, “Interaction between attributes”.
Bold text in columns Translatable and Automerge in the table marks default settings. So when translatable is true you do not have to set automerge to false because this is the default behavior.
A, AA', A' marks where a property has changed. If only the property in the original site has changed (A), only the property in the derived site has changed (A') or both sites have changed (AA').
Translatable | Automerge | Translation Workflow Result |
---|---|---|
True |
True |
|
True |
False |
|
False |
True |
|
False |
False |
|
Table 5.22. Interaction between attributes
Custom Content Type Models
Even if it is not recommended, you can use your own content type model with the Multi-Site feature of CoreMedia Content Cloud. Prerequisite is, that you can configure the Site Model mentioned before to meet the requirements of your own content type model. In addition, you probably need to adapt your document type model to fit the requirements of the multi-site concept.
Therefore, every content type, which may occur in a site must contain all properties, listed below.
master
masterVersion
locale
Please adapt the configuration of each property to the properties of CMLocalized
in
the example above.