Declaring a Decorator

In order for an article decorator to be actually used, you must declare it by adding a ui:decorator element to your publication's content-type resource. For example:

<content-type name="xyz">
  ...
  <ui:decorator name="titleToUpperCase"/>
  ...
</content-type>

Once you have done this, the decorator will automatically take effect for all content items of that type. You can add the decorator to as many content type definitions as you want.

You can add more than one decorator to a content type. For example:

<content-type name="xyz">
  ...
  <ui:decorator name="titleToUpperCase" />
  <ui:decorator name="titleTrim" />
  ...
</content-type>

Note the following:

  • The decorator element belongs to the interface-hints namespace, which means that its name will usually be preceded by a prefix (ui in the examples above) declared at the start of the layout-group resource file. For full descriptions of the layout-group and decorator elements, see the Escenic Content Engine Resource Reference.

  • Multiple decorators are executed in the order they appear in the group definition. This may sometimes be significant. Request decorators, however, are always executed last.