Defining Metadata Sets
With Documents and Media, you can define reusable groups of metadata fields that can be added to custom Document Types. Once created, these Metadata Sets can be selected while creating or editing a Document Type and are added after any fields defined directly in the Document Type form.
To define a new Metadata Set,
-
Navigate to the Documents and Media application in a site or asset library.
To access Documents and Media in a site, open the Site Menu () and go to Content & Data → Documents and Media.
To access Documents and Media in an asset library, navigate to any library where it’s enabled and click on Documents and Media.
-
Open the Metadata Sets tab.
-
Click New to access the New Metadata Sets form.
-
Enter a name for the Metadata Set.
-
In the Builder tab, drag and drop the desired fields into the designated drop zone.
Each field is highly configurable, with Basic and Advanced options. If desired, you can create field groups by dragging and dropping fields on top of one another. These groups can also be configured.
-
(Optional) Click on the Properties tab, and enter a description.
-
Click on Save.
The following fields are available in the Builder tab on the right:
Field | Description |
---|---|
Text | Enter a single line/multiple lines of text. |
Select from list | Select an option from a drop-down list. |
Single Selection | Select an option from a list using radio buttons. |
Multiple Selection | Select one or multiple options using checkboxes. |
Grid | Select options from a matrix. |
Date | Enter a date. |
Numeric | Enter a number. You can set the numeric type as integer or decimal. |
Boolean | Check the check box. |
Image | Send an image file. |
Rich Text | Use a WYSIWYG editor to create rich text content. |
Upload | Send documents and media files. |
Color | Specify a color. |
Web Content | Select a Web Content article. |
Geolocation | Specify a location to associate with the document. |
Link to Page | Link to another page in the same site. |
Separator | Add a separator to organize the content. |
Starting in Liferay 7.4, the Rich Text field in metadata sets uses CKEditor as the only WYSIWYG editor.
Once saved, the new Metadata Set can be accessed and selected when creating or editing Document Types. See Defining Document Types or more information.
Editing Metadata Sets
You can edit your fields to reflect their intended metadata. For example, a text field’s default label is Text. If you want to use the text field as a title, for instance, then you should change the field’s label to Title. Besides the Label field, you can also configure the default values, variable names, mouse-over tips, widths, and other settings. Some fields have a Required setting for specifying whether users must populate the field. If a field’s Repeatable setting is Yes, users can add multiple consecutive instances of the field to the document’s metadata.
-
Click on the field on the editor. This automatically opens the Builder tab on the right.
-
Edit the fields and enter new values.
-
Click Save when finished.