Referencing an Externally Defined Type

Some of the features of Studio rely on displaying a list of existing document types. For instance, that is the case when:

you configure a user action filter,

you use the content-template feature (you choose the type of node you add),

you configure the containment rules in the types definition.

That list of available document types is made from some pre-declared built-in types (Workspace, Folder, File, ...) and the ones created in Studio.

It happens that you don't find in that list the type you are looking for, mainly because:

We forgot to add some built-in types (at the time this page is created it is the case of Forum, Website, MailFolder, ...);

You have deployed on your application some packages that contributes new document types, externally from Studio.

Fortunately we added a way to extend the list of available types, using the "Registries".

What you need to do to declare a missing document type is insert a JSON declaration (written by yourself) in the Registries, that will provide the following information on the document type:

parent,

schemas,

facets,

subtypes,

actions.

Note that the information given in the JSON declaration are used only by Studio, to complete its user interface: it has no influence at all on the package/plugin generated by Studio or, as a consequence, on the behavior of your application. As a direct corollary, it is not mandatory to give the exhaustive information on actions, schemas, facets, subtypes, ... Only those required by what you need in the Studio interface.

Below are step-by-step instructions.

To declare a missing document type in Studio:
Here, we want to add the "Forum" in the built-in types of the content-template feature, and in the container list.

Click on Settings, at the bottom of the left column by default.

Click on Registries to unfold the Registries menu.

Click on Document Types to add a missing document type.

Copy-paste the example provided in Studio.

Change the ID "MyFile" by "Forum" and edit the information so you get this: