Rich-text link handling by the DXA Model Extension or standalone Model Service

Configure the dxa.defaults.rich-text-xmlns-remove and dxa.defaults.rich-text-resolve properties to determine how the DXA Model Extension or standalone Model Service resolves hyperlinks contained in rich text, specifically, whether they will include file extensions. By default, they do not include an extension.

The following two properties work as a pair so that the combination of values determine how the DXA Model Extension or standalone Model Service will resolve links.

PropertyDescriptionDefault
dxa.defaults.rich-text-xmlns-remove Indicates whether or not to remove the xlink tag.
  • true - remove the xlink tag
  • false - leave the xlink tag unchanged
true
dxa.defaults.rich-text-resolve Indicates whether to resolve TCM URIs into links.
  • true - resolve TCM URIs and render the embedded object
  • false - leave the TCM URI tags unchanged; embedded object will not be resolved
true

Example

The following table explains the expected behavior for each possible combination of values for an example link.

Value of

xlmns.remove

Value of

xlmns.resolve

Example where original link is:

<a xlink:href="tcm:1-11">link text</a><!-CompLink tcm:1-11->

truetrue
<a href="link">link text</a>

The xlink tag is removed. Comments are removed.

falsetrue
<a xlink:href="tcm:1-11" href="link">link text</a>

The xlink tag is NOT removed. Comments are removed.

falsefalse
<a xlink:href="tcm:1-11">link text</a>
<Unable to render embedded object: File 
(href="tcm:1-11">link text</a><) not found.--CompLink tcm:1-11->

The link remains unchanged. Comments indicate an error.

truefalse
<a xlink:href="tcm:1-11">link text</a>
<Unable to render embedded object: File 
(href="tcm:1-11">link text</a><) not found.--CompLink tcm:1-11->

This combination is not valid and no changes will occur in the link. Comments indicate an error.