hyperlinkURLDecorator

The hyperlinkURLDecorator can only be used with a content type that meets the following criteria:

  • It has a field of type uri

  • The name of the uri field must be url

To use the hyperlinkURLDecorator, add a ui:decorator element to the content type definition in your publication's content-type resource as follows:

<content-type name="mylink">
  <panel ...>
    <field name="url" type="uri"/>
  </panel>
  ...
  <ui:decorator name="hyperlinkURLDecorator"/>
  ...
</content-type>

The hyperlinkURLDecorator will now modify the url property exposed by mylink content items in the presentation layer. Instead of returning the content item's URL, the url property will return the value entered in the url field.

hyperlinkURLDecorator is used by the core content type Hyperlink that is supplied with the Widget Framework.