binaryURLDecorator

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

  • It has a field of type link

  • The name of the link field must be binary

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

<content-type name="mybinary">
  <panel ...>
    <field name="binary" type="link"/>
  </panel>
  ...
  <ui:decorator name="binaryURLDecorator"/>
  ...
</content-type>

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

binaryURLDecorator is used by the core content type Document that is supplied with the Widget Framework.