Headless Server Developer Manual / Version 2107
Table Of Contents
Inside CoreMedia Rich Text markup, links to other content objects may be embedded inside anchor and image elements.
These are called internal links. Internal links are built by the configured
LinkComposer
for String-valued hyperlinks. Link composers are described in Section 4.8, “Building Links”.
For each anchor (<a>
) element, two attributes are added:
- data-href
Contains the generated link.
- data-show
Contains the link behavior.
Possible values for link behavior as specified in http://www.w3.org/XML/2008/06/xlink.xsd are:
new
replace
embed
other
none
For each image (<img>
) element, a
data-src
attribute is added, with the generated link and adata-uritemplate
attribute with the result of composing a link to aResponsiveMediaAdapter
wrapped around the data blob of the image. It has variables for both the crop name and the desired image width. When expanded with valid values for these variables (as configured in the responsive media settings for the site), this URI template will yield a URL pointing to the MediaController running inside the Headless Server. Note that this might be (and usually is) a URL relative to the Headless Server endpoint.alt
: The alt property of CMMedia objects (or subtypes).
Here is an excerpt of some article detail text with an internal link to a picture document:
<p>ChefSupply RGB LED Strip</p> <p><img data-src="coremedia:/CMPicture/4790" data-uritemplate= "/caas/v1/media/4790/data/826be46e8a8896e07646/{cropName}/{width}/ChefSupply.jpeg" alt="ChefSupply RGB LED Strip 01"/></p>
Note that an example link composer contentUriLinkComposer
for content objects is configured in
CaasConfig.java
and may need customization as described in Section 4.8, “Building Links”. This
example link composer generates links that contains the content id:
<a data-href="coremedia:///cap/content/7246" data-show="embed">