Adding an Online Graphics Content Type
If the newsroom stories to be imported to a publication will include Escenic online graphics, then the publication's content-type resource must contain a suitable content type. The following example shows such a content type definition:
<content-type name="online-graphic"> <ui:icon>image</ui:icon> <ui:label>On-line Graphic</ui:label> <ui:title-field>title</ui:title-field> <ui:decorator class="com.escenic.onlinegraphics.presentation.PreviewServerDecorator"/> <panel name="default"> <field mime-type="text/plain" name="title" type="basic"> <ui:label>Title</ui:label> <ui:description>The title of the article</ui:description> <constraints> <required>true</required> </constraints> </field> <field mime-type="application/json" name="graphics" type="basic"> <ui:label>Graphic</ui:label> <graphics xmlns="http://xmlns.escenic.com/2010/graphics"/> </field> </panel> <summary> <ui:label>Content Summary</ui:label> <field mime-type="text/plain" name="title" type="basic"> <ui:label>Title</ui:label> </field> </summary> </content-type>
The important points to note are highlighted in the example:
-
The
content-type
element must contain a childui:decorator
element specifying thePreviewServerDecorator
class. -
The field that contains the actual graphic:
-
must have its
mime-type
attribute set toapplication/json
-
must have a child element called
graphics
that belongs to the namespacehttp://xmlns.escenic.com/2010/graphics
.
-
A content type may contain only one online graphics field.