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.

Default Document Types

Default document types are generated when you first start a virtual instance or create a new company. To prevent their creation in future instances or companies,

  1. Open the Product Menu (Product Menu), navigate to Control Panel, and click System Settings.

  2. Click Documents and Media under Content and Data.

  3. Under Service, uncheck Add Default Structures and click Save.

This setting only applies to new instances or companies created thereafter.

You can also use a configuration file to configure this setting:

  1. Create a config file named com.liferay.document.library.configuration.DLConfiguration.config.

  2. Add addDefaultStructures=B"false" to the file and save it.

  3. Place the file in the osgi/configs directory in your Liferay bundle before starting the server.

When set, the Add Default Structures option is unchecked on startup, and no default document types are created.

Defining 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. Open the Document Types tab.

  3. Click New 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.

    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.

    Configure each field and 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 appear in addition to these default fields.

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

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

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

    Enter a description in the Details tab, add metadata sets in the Additional Metadata Fields tab, and 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.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy