Access to contenttype description from script api

When I create a create-content-form on a page, it would very handy to get the contenttype description data about which fields exists, required fields, limitations, etc. That way the form can be generated dynamically, instead of rewriting the form for every contenttype, and whenever a contenttype change.

A possible feature could be in the script api that gets the contenttype description. Like:

var contenttype = execute('portal.getContentTypeDescription', { 'name': 'article' });
4 Likes

Hi.

With the new features of 6.0 it would be easy enough to create a library for that functionality.

2 Likes

It would also be nice to get the content type based on a given content ID, without opening and parsing the content item first…

Well, there seems to be such functionality in the admin panel, would be great to have a form “framework” on pages.
Related post: XP Using auto generated content create/edit forms (ContentWizardPanel) outside admin

We have decided to extend the content lib to include a function to retrieve the content type definition. ETA is not decided yet.

1 Like