Types#
Available content types in a Plone site can be listed and queried by accessing the /@types endpoint on any context.
Get types list#
Query function#
Use the getTypesQuery function to get the query for fetching the list of all available types.
Hook#
Use the useGetTypes hook to get the list of all available types.
Get type#
Query function#
Use the getTypeQuery function to get the query for fetching the information about the content type provided.
Hook#
Use the useGetType hook to get the information about the content type provided.
Parameters#
contentPath: stringRequired: Yes
Get type field#
Query function#
Use the getTypeFieldQuery function to get the query for fetching the information about the field of the type provided.
Hook#
Use the useGetTypeField hook to get the information about the field of the type provided.
Parameters#
contentFieldPath: string
Required: Yes
Add type field/fieldset#
Mutation function#
Use the createTypeFieldMutation function to get the mutation for adding a field/fieldset to the type provided.
Hook#
Use the useCreateTypeField hook to add a field/fieldset to the type provided.
Parameters#
contentPath: stringRequired: Yes
data: object
Required: Yes
It can have the following fields:
description: stringRequired: Yes
factory: stringRequired: Yes
required: booleanRequired: No
title: stringRequired: Yes
Update type field/fieldset#
Mutation function#
Use the updateTypeFieldMutation function to get the mutation for updating a field/fieldset of the type provided.
Hook#
Use the useUpdateTypeField hook to update a field/fieldset of the type provided.
Parameters#
contentPath: stringRequired: Yes
data: object
Required: Yes
It can have the following fields:
description: stringRequired: No
maxLength: integerRequired: No
minLength: integerRequired: No
fields: string[]Required: No
required: booleanRequired: No
title: stringRequired: No
properties: anyRequired: No
fieldsets: any[]Required: No