The Title setting provides an auto-generation of the title. The title can be plain text or it can be a placeholder for one or several field values, or it can be a combination of these. The placeholder is the {Field ID}, the example below shows a combination of plain text, field name, and sub-field name:
A template title can be auto-generated by combining one or several of these options:
Normal text: Plain text (red).
{Field ID}: Substituted with the value of the field (green).
{Field ID/subfield ID}: Substituted with the value of the subfield (purple).
{listfieldname/#index/cellname}: Substituted with the value of the field in a row in a list. Note that the index is zero-based.
Warning: The auto-generated title's length is not shortened in Vizrt web clients. However, if the title is longer than 128 characters, it is reduced when dragging out the MOS XML file due to size constraints. This affects the element title in the newsroom system.
Note: When the template uses custom HTML representation, it is highly recommended to set a pattern for Auto-generated title.
Use Case: Enable Auto Generated Title on Placeholder Elements
A common workflow, is to create library elements and use them as placeholders in a rundown. To easily recognize these placeholders, they are often given special names, such as PLACEHOLDER – LOWER THIRD. These elements are typically inserted into the rundown in advance by the person preparing the rundown skeleton.
When a journalist later opens such placeholder item, they fill in the relevant fields and click Save. At this point, the suggested save name is still the overridden library title (for example, PLACEHOLDER – LOWER THIRD), because the auto-generated title was replaced by the placeholder title. In practice, however, the placeholder name should never appear in the rundown. The auto-generated title should be used instead.
A journalist can manually delete the suggested title in the save dialog, to restore the auto-generated title. Alternatively, the template script can automatically enforce this, by including the following code:
vizrt.fields.$1.onChanged = () => { const titleField = vizrt.fields["$-title"]; if (titleField.value?.startsWith("PLACEHOLDER")) { titleField.value = ""; }};In this example, whenever the field 1 is changed by the user, the script checks the current title. If the title begins with PLACEHOLDER, it is cleared. This ensures the auto-generated title is used as the suggested save name, rather than the placeholder name.
