Defining Summaries

A summary is a subset of the fields or storyline elements in a content item. Summaries are used as teasers for content items desked on section pages or dragged in as relations to other content items. (Whether or not they are in fact used in this way depends, however, upon your presentation layer application.)

Summaries are defined by including a summary element in the content type definition.

The summary element must contain one or more field elements.

For legacy stories and media content types, these elements are usually references to fields that are already defined in the main part of the content type, for example:

  <content-type name="file">
    <ui:label>File</ui:label>
    <ui:title-field>title</ui:title-field>
    <panel name="main">
      <field mime-type="text/plain" type="basic" name="title">
        <ui:label>Title</ui:label>
        <constraints>
          <required>true</required>
        </constraints>
      </field>
      <field mime-type="text/plain" type="basic" name="description">
        <ui:label>Description</ui:label>
      </field>
      <field name="binary" type="link">
        <ui:label>File</ui:label>
        <relation>com.escenic.edit-media</relation>
        <constraints>
          <mime-type>application/pdf</mime-type>
          <mime-type>text/*</mime-type>
        </constraints>
      </field>
    </panel>
    <summary>
      <field name="title" type="basic" mime-type="text/plain"/>
      <field name="description" type="basic" mime-type="text/plain"/>
    </summary>
  </content-type>

For native CUE stories, the summary's field elements usually refer to storyline elements instead of fields:

<content-type name="story">
  <ui:icon>news</ui:icon>
  <ui:label>Story</ui:label>
  <ui:title-field>slug</ui:title-field>
  <panel name="main">
    <ui:label>Main</ui:label>
    <field name="storyline" type="link">
      <relation>com.escenic.storyline</relation>
      <ui:label>Storyline</ui:label>
      <constraints>
        <mime-type>application/vnd.escenic.storyline+json</mime-type>
      </constraints>
    </field>
  </panel>
  <panel name="metadata">
    <ui:label>Metadata</ui:label>
    <field mime-type="text/plain" type="basic" name="slug">
      <ui:label>Slug</ui:label>
      <ui:description>The working title of the story</ui:description>
      <constraints>
        <required>true</required>
      </constraints>
    </field>
  </panel>
    <summary>
      <field name="headline" type="basic" mime-type="text/plain"/>
      <field name="leadtext" type="basic" mime-type="text/plain"/>
    </summary>
</content-type>

When a content item is desked on a section page or added to another content item as a relation in CUE, the content of the referenced field or storyline element is copied into the summary field as default content. The CUE user can, however, edit this default content. This makes it possible for summary fields to have different content to their source fields/storyline elements, and also for content item that appear in multiple locations in a publication to have different summary fields in each location.

A summary field does not have to reference an existing field or storyline element. If it doesn't, then when the content item is added to a section page or related to another content item, the field is blank by default.

Note that:

  • You cannot use ref-field-group inside summary elements: you must directly specify the fields to be included in the summary.

  • You cannot use rich text fields (that is, basic fields with the MIME type application/xhtml+xml) in summaries.

  • A storyline may contain more than one instance of the storyline element referenced by a summary field. In this case, the first instance is used.

  • Any annotations in the content of a storyline element are removed when the content is copied to a summary field.