Skip to main content
Version: 2.10

Configuring custom types

D1 provides a functionality for adding custom properties to contents and folders.

This page describes how to configure custom types on a repository. In this tutorial, we assume that the users need two extra properties on contents - a hasBeenReviewed check box and reviewComments text field.

To set up custom types for a repository

  1. Log in to D1, and open the Administrator.

  2. Select a repository and then run the Ensure Models action. This will create custom data and service models on your repository, which you will later extend with new data types.

  3. Open a repository that you want to customize. Highlight the Content Configuration option and open the Data Model from the Modeling menu:

  4. Add New Data Type to the model:

  5. Set the appropriate Kind parameter (content in our case, but you can also create custom folder types):

  6. Add the properties for your custom type:

  7. Go back to the main repositories view and do the following:

    1. Deactivate your repository.
    2. Synchronize your repository.
    3. Activate the repository again.

You're done! You should now be able to add custom documents to your repository.

To test the configuration

We're going to test the configuration of our custom content type and its properties, and verify their availability in the repository.

  1. Open the repository you that you have just configured.

  2. Add a content. You should see your custom type in the selection list:

  3. Check the content's details.

    Your properties are to be available in the CUSTOM section:

    REST endpoints related to contents and folders now have the entryType parameter so that you can work with custom types: