Server

HOWTO: Define a Document Type

This page is scheduled for review and update. Check back soon for updated content!

Introduction

When you want to create a new document in your application, you need to select the type of document you want to create:

Nuxeo Studio enables to create as many document types as needed. This how-to explains every step to create your own.

Since content is at the center of our configuration, the definition of a new document type is related to many other features of the Nuxeo Platform.

Nuxeo Studio Modeler and Designer

Nuxeo Studio consists in:

  • Nuxeo Studio Modeler: which defines all your custom core components (workflows, lifecycles, document structure, automations...) such as building the definition and structure of your document types.
  • Nuxeo Studio Designer: which allows you to configure the layouts associated to your document types. It is dedicated to all configuration items linked to the user interface.

Defining a Document Type

  1. Open Nuxeo Studio Modeler.
  2. Go to Content Model > Document Types and click on the New button.
  3. On the creation form:

    1. Fill in the ID, label and description of your document type.

      You can override built-in types definition (File, Folder, ...) by creating a type with the same name. See the dedicated how to override existing document types.

    2. In Extends, select the document type to inherit characteristics from.

      Common inheritance choices are Folder for a folderish document type and File for a "file-based" document type.

    3. Click OK.

      Your document type is created. Now, you need to configure its characteristics: schema, lifecycle, etc.

  4. Fill in the Definition tab.

    For more information on each parameter, click on the question mark.

  5. To customize icons, click on Select Resource button to select any PNG/SVG file available in the Studio project resources or upload your own.

    In order for an icon to work on every different views, you need:

    • A .png icon for the Icon and Large Icon fields.
    • An .svg icon next to the SVG Icon field.

    If the icons and lifecycle resources for your document type do not exist yet, you can create them from:

  6. Fill in the Schema tab with specific properties you need:

    1. Name your schema. By default, it will be named after the document type id.
    2. Add your properties fields. To create fields, you need to enter at least the name and the type of the metadata.

Configuring Document Type Layouts

  1. Open Nuxeo Studio Designer.

  2. Go to UI > Layouts > Local types. You should find your document type here.

  3. To edit the creation layout, select the create entry and click on Configure.

  4. Drag and drop all the properties you need into the main view.

  5. Save your configuration and repeat with the edit, import, metadata and view layouts.

    Use the edit mode of the properties for editable value, and the view mode for read-only values).

Click Configure Missing Layouts to configure by default the rest of the layouts for this document type. The configured layouts will consist in the title, description and required fields of your document type.

  1. Go to UI tab, and open the Translations menu.
  2. To translate your document type properties, click Edit on the messages.json file and enter:

    1. For document type labels:
      "label.document.type.<name_of_your_doctype>":"<label_of_your_document_type>"
    2. For a document type property:
      "label.doctype.<name_of_your_doctype>.<name_of_your_property>":"<label_of_your_document_type_property>"

Deploying a Document Type

  1. Click on Save to save your configuration.
  2. Deploy your configuration on your Nuxeo Platform instance.
  3. Start your Nuxeo Server. Your new document type is displayed in the Available document Types popup window.

To create a document, click on the Create button and select your document type.

Content Type Layouts Configuration with JSF UI (deprecated)

If you need to a create a document type layout for JSF UI, then you have to use Nuxeo Studio Modeler. In this case, you need to ensure that Nuxeo JSF UI is selected as one of the target packages of your Settings > Application Definition.

  1. Open Nuxeo Studio Modeler.
  2. Go to Content Model > Document Types and click your document type.
  3. In Tabs:
    1. Check the views you want to disable for your document type.
    2. If you created new content views, go to Content views and add them.
  4. Specify the creation, edition and view forms layouts in the corresponding tabs:

    1. Drag and drop fields names from the right to the grid.
    2. Edit the corresponding widget properties.

      If the vocabularies you want to use in your layouts don't exist, you can create them in Vocabularies .


15 days ago manonlumeau Final review
3 years ago Manon Lumeau 52
3 years ago Solen Guitter 51 | Fix Studio menu label
4 years ago Solen Guitter 50 | link update
5 years ago Solen Guitter 49
5 years ago Manon Lumeau 48
5 years ago Manon Lumeau 47
5 years ago Manon Lumeau 46
5 years ago Manon Lumeau 45
5 years ago Manon Lumeau 44
5 years ago Solen Guitter 43
5 years ago Manon Lumeau 42
5 years ago Manon Lumeau 39
5 years ago Manon Lumeau 40
5 years ago Manon Lumeau 41
5 years ago Manon Lumeau 38
5 years ago Manon Lumeau 37
5 years ago Manon Lumeau 36
5 years ago Manon Lumeau 35
5 years ago Manon Lumeau 34
5 years ago Manon Lumeau 33
5 years ago Manon Lumeau 31
5 years ago Manon Lumeau 32
5 years ago Manon Lumeau 30
5 years ago Manon Lumeau 29
5 years ago Manon Lumeau 28
5 years ago Manon Lumeau 27
5 years ago Solen Guitter 26
6 years ago Solen Guitter 25
8 years ago Solen Guitter 23
8 years ago Solen Guitter 24 | Migrated to Confluence 4.0
8 years ago Solen Guitter 22
8 years ago Solen Guitter 21
8 years ago Solen Guitter 20 | updated screenshots with latest UI
8 years ago Solen Guitter 19
8 years ago Solen Guitter 18
8 years ago Solen Guitter 17
9 years ago Solen Guitter 16 | added link to vocabulary creation howto
9 years ago Stéfane Fermigier 15
9 years ago Solen Guitter 14 | Removed example pasted from tutorial
9 years ago Solen Guitter 13 | changed screenshot
9 years ago Solen Guitter 12 | added screenshots and reorganized instructions
9 years ago Solen Guitter 11 | added link to doc type definition
9 years ago Solen Guitter 10
9 years ago Alain Escaffre 8
9 years ago Alain Escaffre 9
9 years ago Alain Escaffre 7
9 years ago Alain Escaffre 6
9 years ago Alain Escaffre 4
9 years ago Alain Escaffre 5
9 years ago Alain Escaffre 3
9 years ago Alain Escaffre 2
9 years ago Eric Barroca 1
History: Created by Eric Barroca

We'd love to hear your thoughts!

All fields required