Controlling CUE Content Card Fields

CUE uses content cards to represent content items in the user interface. Search results, for example, are displayed as a list of content cards. A content card consists of three fields: a title, a summary and a binary. The fields are filled as follows:

Title

For legacy stories and media content types, the content card title is taken from the content type field referenced by the ui:title-field element. For native CUE stories it is taken from the first storyline element containing a ui:title-field element. If there is no such storyline element, then it is taken from the content type field referenced by the ui:title-field element.

Summary

For legacy stories and media content types, the content card summary is taken from the content type fields referenced by the com.escenic.index.summary.fields parameter. For native CUE stories it is taken from the first storyline element containing a ui:summary-field element. If there is no such storyline element, then it is taken from the content type fields referenced by the com.escenic.index.summary.fields parameter.

Binary

For legacy stories and media content types, the content card binary is taken from the first related binary content item. For native CUE stories it is taken from the first storyline element containing a link field that references a binary content item. If there is no such storyline element, then it is taken from the first related binary content item.

This means that for legacy stories and media content types, you can control the content of the content card title and summary by adding a ui:title-field element and a parameter element to the content type definition, for example:

<content-type name="story">
  ...
  <ui:title-field>title</ui:title-field>
  <parameter name="com.escenic.index.summary.fields" value="leadtext"/>
  ..
</content-type>

You can use the same method for native CUE stories, but you also have the option of marking specific storyline elements to be used as the title or the summary. For example:

<story-element-type
  xmlns="http://xmlns.escenic.com/2008/content-type"
  xmlns:ui="http://xmlns.escenic.com/2008/interface-hints" name="headline">
  ...
  <ui:title-field />
  ...
</story-element-type>

or

<story-element-type
  xmlns="http://xmlns.escenic.com/2008/content-type"
  xmlns:ui="http://xmlns.escenic.com/2008/interface-hints" name="leadtext">
  ...
  <ui:summary-field />
  ...
</story-element-type>

If you do this, then it will take precedence over anything specified in the content-type definition.