Media Content Field

The Media Content field represents a field that can be created in Model Builder, allowing the inclusion of media files, such as images, videos, playlists, and documents in Entries.

This field enables users to enhance their content by inserting relevant media files within their articles. The following section explains the configuration of the Media Content in the model builder and its usage in an entry, depending on these configurations.

Media Content Field in Model Builder

When adding a Media Content field in the model builder, you can configure its settings in the right sidebar. The field information that needs to be filled in includes:

  • Field name: This is the name of the field that will be displayed in entries and other relevant areas.

  • Alias: A required and unique identifier for the field, which cannot be modified once the field is saved.

  • Description: An optional field that allows you to describe the purpose or use case of the Media Content field.

  • No. of Media: This specifies the number of media files that can be added in the field. You can choose between "One Media" (which allows users to add only one media file) or "Multiple Media" (which allows users to add more than one media file). Once saved, this option cannot be changed for the field.

  • Media types: This specifies the type of media files that can be added in the field. You can choose any of the following options, such as Images, Files, Videos, and Playlists. These options can be changed after saving the field in the model.

Once you have filled in the necessary field information in the configuration sidebar, you can click the "Create" button at the bottom, and the Media Content field will be successfully added to the model editor.

Media Content Field in Model Builder

Media Content Field Configuration

By selecting the Media Content field in the model editor, you have access to several quick actions. These actions enable you to delete the field, open the configuration sidebar, and adjust the field's position within the model.

The Configuration sidebar consists of three tabs: General, Appearance, and Validations. These tabs provide various settings and options for customizing the behavior and appearance of the Media Content field.

General tab

The General tab in the configuration of the Media Content contains essential field information, including Field name, Alias, Description, No. of Media, Media types, and Calculate metrics option.

The Calculate metrics option is represented by a switch toggle, which determines whether you want the media files added in this field to be calculated and displayed in the Metrics section on the right sidebar of the entry.

Note that while the Field name, Description, Media types, and Calculate metrics option can be modified even after saving the field, the Alias and No. of Media cannot be modified once the field has been saved in the model builder. These settings are fixed and cannot be changed once the field is created.

Appearance tab

The Appearance tab in the configuration of the Media Content field focuses on how the field will be displayed in the entries created by the model. For this field, there is only one available option: "Media Grid," which is selected by default.

The Appearance tab also includes the Help Text field. This field can be used to display a tooltip in the entry, providing users with additional guidance and understanding of how to use the Media Content field effectively.

Additionally, this tab has the option Show 'Upload new media', which determines whether the user can upload new media based on their permissions. By default, the "No" option is selected, which means that the "Upload" button will not be displayed to the user when adding media to the respective field in the entry. If the "Yes" option is selected, then the "Upload" button will be displayed to the user when adding media to the respective field in the entry.

Appearance Tab

Validations tab

In the Validations tab, you have the ability to apply constraints to the Media Content field. These constraints enforce specific requirements on the field's input, ensuring that the entry cannot be published unless the Media Content field adheres to these restrictions. The available options for validation include:

  • Required field: If you select this option, the Media Content field must be filled when creating an entry. It becomes mandatory to add a media file in the Media Content field before the entry can be published.

  • Required Metadata: Enabling this option ensures that the added media files in the Media Content field are filled with the required metadata that can be selected, such as Title, Caption, Alt Text, Source, Author, Copyright, and Tags. It becomes mandatory to add the selected required metadata for the media files in the Media Content field before the entry can be published.

  • Specify number of assets: This option allows you to limit the number of assets that users can add into the Media Content field. Users will only be able to add media files within this specified range. The available options are:

    • Between: With this option, you can set both a minimum and a maximum value, limiting users to add media files that fall between these two values.

    • At least: This option sets a minimum value, and users must add media files that are equal to or exceed the specified minimum.

    • At most: This option sets a maximum value, and users must add media files that are equal to or below the specified maximum.

    • Exactly: With this option, you can set an exact number of media files, and users will be restricted to add media files within this defined range.

Note that the "Specify number of assets" validation will be available only when the Media Content field is specified as "Multiple Media" under the No. of Media section. This configuration allows users to add more than one media file to the field.

By leveraging the Validations tab, you can ensure that the Media Content field in your model enforces specific constraints, maintaining data integrity and consistency in your entries.

Validations Tab

Media Content Field in Entry Editor

The Media Content field in the entry will be displayed and can be used based on the configuration in the model. Let's explore some appearances and use cases of the Media Content field in the entry editor.

  • One Media: If the No. of Media is set to "One Media" in the model, the user can only add one media file in the Media Content field in the entry editor.

  • Multiple Media: If the No. of Media is set to "Multiple Media" in the model, the user can add more than one media file in the Media Content field in the entry editor.

  • Images: If the Media type section has selected the "Images" option, the user can add images in the field in the entry editor.

  • Files: If the Media type section has selected the "Files" option, the user can add files in the field in the entry editor.

  • Videos: If the Media type section has selected the "Videos" option, the user can add videos in the field in the entry editor.

  • Playlists: If the Media type section has selected the "Playlists" option, the user can add playlists in the field in the entry editor.

  • Images metrics: If the "Calculate metrics" option is selected in the model, the added media files will be calculated for the respective field, and the metrics will be displayed in the entry.

  • Help text: If a help text is added to the Media Content field in the model's configuration, it will be displayed as a tooltip near the field's title in the entry editor, providing additional guidance.

  • “Upload” button: If the “Show 'Upload new media'” option is set to "No" in the model, the "Upload" button will not be displayed in the Assets modal when browsing for media. If the “Show 'Upload new media'” option is set to "Yes" in the model, the "Upload" button will be displayed in the Assets modal when browsing for media.

  • Required field: If the Media Content field is marked as a required field in the model, the user cannot publish the entry without adding a media file to the respective field. A warning message with a red color will be displayed under the field, indicating that the Media Content field is required.

  • Required metadata: If the Media Content field is specified with required metadata to be filled for the added media files, the user cannot publish the entry if the required metadata are not filled in. A warning message with a red color will be displayed under the field, indicating that the required metadata are required for the field.

  • Number of assets: If a specific number of assets is defined for the Media Content field in the model, the user cannot publish the entry if the added media files do not fall within the specified range. A warning error with a red color will be displayed under the field, depending on the template configuration in the model.

Media Content Field in Entry Editor