title-field
The title-field
element is used for two purposes:
-
To identify which of a content type's fields CUE is to be used as the internal title or slug. It is this field that will be used as the "name" of content items in CUE:
<content-type name="story"> <ui:title-field>slug</ui:title-field> ... <panel name="metadata"> <field mime-type="text/plain" type="basic" name="slug"> <constraints> <required>true</required> </constraints> </field> </panel> </content-type>
-
To indicate that the content of a story element type may be used as a story title or slug. It is typically used in the definition of a headline story element type, so that the headline entered when a content item is first created becomes the slug used to identify it in CUE:
<story-element-type xmlns="http://xmlns.escenic.com/2008/content-type" xmlns:ui="http://xmlns.escenic.com/2008/interface-hints" name="headline"> <field name="headline" type="basic" mime-type="text/plain"> </field> <ui:title-field/> ... </story-element-type>
You can only specify this element as the child of a
content-type
or story-element-type
element: it is ignored in all other contexts.