Content-in content via XLINK
Create Content-in-content (CiC) in the censhare Client using an XLINK structure.
Introduction
Referencing of placed assets is done using the AssetRef widget. Automated processes can detect and handle those placements. The following workflow is applied:
Create the reference in XLINK syntax.
Save the actual reference as a censhare REST URL.
Allow both versioned and unversioned asset references.
The type of the relation should be included in the link.
The AssetRef widget has built-in support for XLINK references. An attribute link-mode in the dialog definition controls the type of the reference (asset ID or XLINK) that is created by the widget.
Example
The syntax looks as follows:
<xe:assetref source="[link-element]" link-mode="[link mode]" link-role="[link role]"
…
<xe:inititems>
<xe:inititem dest="[link-attr]" value="[value]"/>
</xe:inititems>
</xe:assetref>
Configuration
Attributes
source: XML path to the link element (required)
link-mode: Tells the AssetRef widget, which type of links to create. Known types are:
"xlink+rest": XLINK references to an asset (current asset version)
"xlink+rest+versioned": XLINK references to an asset (including the asset version)
"id": Only the asset ID is stored in the source attribute (default)
link-role: Metadata attributes describing the semantic role (usage) of the link. Usually, the role is used to define the type of asset relation for this link. In that case, the following URL syntax must be used: censhare:///service/masterdata/asset_rel_typedef;key=actual.teaser
intitems: Optional init items exist to set any further metadata attributes, for example, a link title (xlink:title). The init items are applied to the created link element.
Example
<xe:assetref source="article.teaser.ref"
link-mode="xlink+rest+versioned"
link-role="censhare:///service/masterdata/asset_rel_typedef;key=actual.teaser."
label="XLINK" weight-x="1" height="50" css-key="asset-info" expression-id="asset-ref-list">
<xe:inititems>
<xe:inititem dest="@xlink:title" value="Teaser"/>
</xe:inititems>
</xe:assetref>
Entire XLINK structure
<ref xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="censhare:///service/assets/asset/id/123456/version/1"
xlink:role="censhare:///service/masterdata/asset_rel_typedef;key=actual