Gallery Relations
In most cases, relations represent secondary content in a content item: they represent images or video that accompany an article, or links to other relates articles. It therefore makes sense for them to be displayed on the far right of the editor pane in Content Studio. Occasionally, however, this is not the case. In some kinds of content items, relations represent the primary content. The image galleries seen in many web publications are an example of this kind of content item. In an image gallery, images are the primary content, so they should be presented as primary content in Content Studio.
You can cause relations to be displayed as primary content in
Content Studio
by adding a ui:editor-style
element (see editor-style)
to a relation-type
definition in the
content-type
resource.
The following example shows how it is used:
<relation-type name="gallery"> <ui:editor-style>gallery</ui:editor-style> </relation-type>
ui:editor-style
only has any effect if it is
the child of a relation-type
element and if it
contains the value gallery
. It causes relations of
the specified type to be displayed like ordinary fields in Content Studio. It only
affects display in Content Studio and has no other effects. Despite the use of the
keyword "gallery", it is not restricted to use with image relations: you
can use it for any relation type that you want to appear in the main
part of the editor pane in Content Studio.