What is the difference between subtypes tag in "types" and "doctype" extension points?

When we define a new document type, with contributions to “types” and “doctype” extension points, we can limit what subtypes can be created (and which ones will be displayed) under the new type. This is done by adding the subtypes tag in the “types” extension point.

We have seen that “doctype” also has a “subtypes” tag, and that it is used in some contributions, but we don't know what is the result. We don't see any difference.

Is the “subtypes” tag from the “doctype” extension point necessary? What is it for?

Thank you,

0 votes

1 answers

2560 views

ANSWER



As you mentioned, the subtypes in “types” extension point refers to the limitation of creation of subtypes. I have used it to limit the subtypes for my custom folder types. But the subtypes in “doctype” extension is not necessary i guess. I removed the subtype block in “doctype” and deployed my project. Its working similar.

But another thing what i observed is, if i declare the subtypes in “doctype” but not in “types”, then also subtypes(which i had declared) works. So mentioning subtypes in any one of the extention point is enough.

1 votes



Thanks for your answer, Pradeep! We are ignoring subtypes tag for "doctype" XP. I guess it can be useful for document types that are not visible in the UI, as "types" XP defines the information needed for the web, but we are not 100% sure. We just wanted to ensure it and hoped that someone in the Nuxeo team would confirm it, but we can live without it ;)
11/03/2015