Nuxeo Server

How to Define a Document Type

Introduction

When you are in the application and you want to create a new document, you need to choose the type of document you want to create:

You can create as many document types as you want with Nuxeo Studio. This how-to explains the different steps to do so.

Since content is at the center of customization, the definition of a new document type is related to many other features of the Nuxeo Platform. This how-to presents the basic steps to create a new document type and provides links to other related customizations with Nuxeo Studio, such as layout definition for instance.

Nuxeo Studio Modeler and Designer

Nuxeo Studio is divided in two sections:

  • Nuxeo Studio Modeler aims at building the document type definition and structure. More globally, it defines all your custom core components (workflows, lifecycles, document structure, automations...).
  • Nuxeo Studio Designer allows you to configure the associated document type layouts for the Web UI application (as it is dedicated to all configuration items linked to the user interface).

Nuxeo Studio Designer is dedicated to configure Web UI: if you need to a create a document type layout for JSF UI, then you will have to use Nuxeo Studio Modeler. In this case, you need to ensure Nuxeo JSF UI is selected as one of the target packages of your application definition (to do so go to Settings > Application Definition).

Content Type Definition with Nuxeo Studio Modeler

  1. Open Nuxeo Studio Modeler
  2. Unfold the Content Model item of the Studio tree, click on Document Types and click 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, ...): just create a type with the same name. See the dedicated how to override existing document types.

    2. Select the document type you want to extend and so inherit from.

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

      Your document type is created. You now need to edit it to indicate all its characteristics: layouts, lifecycle, schema, etc.

  4. Fill in the Definition tab.

    Click on the question mark to have more information on each of the parameters.

    If the icons and lifecycle resources for your document type don't already exist, you can create them from:

  5. Fill the specific metadata you want in the Schema tab.
    1. Give your schema a name and a prefix (which are the same as the document type name by default).
    2. Add your metadata fields. The name and type of the metadata are the minimum required pieces of information required for a field.

Content Type Layouts with Nuxeo Studio Designer (Web UI)

  1. Open Nuxeo Studio Designer.

  2. Go to Layouts > Local types. You should see the name of your document type here.

  3. Edit the creation layout by selectioning the create entry, and press on Configure in the lower right corner.

  4. Drag and drop all the metadata you need into the main central area;

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

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

  6. Go to the Resources tab

    1. Create the images folder and the doctypes subfolder (using the Create icon, at the bottom of the left panel)

    1. Import your document type icon, in SVG format, in the /UI/images/doctypes folder. The SVG file should have the same name as your document type (my_custom_doctype.svg for example).
  7. Go to UI tab, and open the Translations menu

  8. Create a messages.json file to translate your document type name and properties

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

Content Type Layouts with Nuxeo Studio Modeler (JSF UI)

  1. In the Tabs tab:
    1. Check the default tabs that should not be displayed for your document type.
    2. If you created new content views, add news tabs in the Content views sub-tab.
  2. 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 the Studio tree item Vocabularies .

Content Type Deployment

  1. Click on Save to save your configuration.
  2. After you deploy your customization on the your Nuxeo Platform instance, your new document type is displayed in the Available document type popup window.

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

We'd love to hear your thoughts!

All fields required