Default Image Caption Configuration

Images included in event entries have captions. In Live Center, the caption is displayed as a tool tip if the user holds the mouse pointer over the image. The caption can be set by the user in Live Center (see Adding Images). If no caption is explicitly specified, then the image content item's title field (that is, the field pointed to by the ui:title-field element) is used as a default caption.

If you wish, you can configure the image content type so that Live Center uses the content of a different field as the default caption. You do this by adding a com.escenic.live-center.content-type.title parameter to the image's content type definition in the content-type resource. In the following case, for example:

<content-type name="image">
  <ui:title-field>name</ui:title-field>
  <panel name="main">
    <field mime-type="text/plain" type="basic" name="name">
      <ui:label>Name</ui:label>
      <ui:description>The name of the image</ui:description>
      <constraints>
        <required>true</required>
      </constraints>
    </field>
    ...
    <field mime-type="text/plain" type="basic" name="alttext">
      <ui:label>Alternative text</ui:label>
    </field>
    ...
</content-type>

the content of the name field is used as the default caption. You can force Live Center to use the alttext field as the default caption instead by adding a com.escenic.live-center.content-type.title parameter as follows:

<content-type name="image">
  <parameter name="com.escenic.live-center.content-type.title" value="alttext"/>
  <ui:title-field>name</ui:title-field>
  <panel name="main">
    <field mime-type="text/plain" type="basic" name="name">
      <ui:label>Name</ui:label>
      <ui:description>The name of the image</ui:description>
      <constraints>
        <required>true</required>
      </constraints>
    </field>
    ...
    <field mime-type="text/plain" type="basic" name="alttext">
      <ui:label>Alternative text</ui:label>
    </field>
    ...
</content-type>