oo

Defining Document Types

In Liferay, Document Types are templates used for uploading files and categorizing them in Documents and Media. These templates are created using metadata fields and provide additional, searchable information for uploaded files.

Follow these steps to define a custom Document Type.

  1. 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 (Site Menu) and go to Content & DataDocuments and Media.

    Click on Documents and Media under Content & Data in the Site Menu.

    To access Documents and Media in an Asset Library, navigate to any Library where it’s enabled and click on Documents and Media.

    Click on Documents and Media in the Asset Library.

  2. Click on the Document Types tab.

  3. Click the Add button (Add) to access the New Document Type form.

  4. Enter a name for the Document Type.

  5. In the Builder tab, drag and drop the desired fields into the designated drop zone.

    Add fields in the Builder tab.

    Each field is highly configurable, with Basic and Advanced options.

    Configure each field.

    If desired, you can create field groups by dragging and dropping fields on top of one another. Each group can also be configured as a unit.

    Create and configure field groups.

    note

    All custom Document Types have the following fields: Upload File, Title, File Name, and Description. Fields added to a custom Document Type are listed in addition to these default fields.

  6. (Optional) Click on the Details tab, and enter a description.

    Enter a description in the Details tab.

  7. (Optional) Click on the Additional Metadata Fields tab and select any existing Metadata Sets you want to add to the new Document Type.

    Add Metadata Sets in the Additional Metadata Fields tab.

  8. (Optional) Click on the Permissions tab, and configure who can view, edit, and manage the new Document Type.

    Configure permission for the Document Type in the Permissions tab

  9. Click on Save.

Once saved, the new Document Type can now be accessed in the Documents and Media tab, where you can use it to start a new upload.

Use the Document Type to start a new upload.

When the Document Type is selected, users see your configured metadata fields. See Uploading Files for more information.

For Liferay 7.3.x and Earlier Versions

  1. Open the Product Menu (Product Menu) then click the compass icon (Compass) on the Site Administration menu.

  2. Select the site where the form will be created.

  3. Click Content & DataDocuments and Media.

  4. Click the Document Types tab.

  5. Click the Add button (Add). The New Document Type form appears.

  6. Enter a name.

  7. Enter a description.

  8. Expand the Main Metadata Fields section.

  9. Drag and drop the metadata fields into the editor.

    Drag and drop main metadata fields

  10. Expand the Additional Metadata Fields.

  11. Select a metadata set to associate with the document type. To learn more, see Defining Metadata Sets.

    Associate additional metadata sets.

  12. Click Save.

The new Document Type is now available when adding a document via the Documents and Media’s Add menu.

The new Document Type is now available.

When users create new files of the document type, they’re presented with metadata fields to describe the document.

Creating a new Picture Document