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 theinterface-hints
namespace, which means that its name will usually be preceded by a prefix (ui
in the examples above) declared at the start of thecontent-type
resource file. For full descriptions of thecontent-type
anddecorator
elements, see the CUE Content Store 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.