Content type
Definition of the JSON object that allows the creation and customization of the content type.
A content type is a key element that defines the structure and associated metadata for a specific type of content within a document library or list. Content types enable standardizing the organization and management of data in SharePoint by defining the attributes and properties that can be applied to a particular set of documents or items.
Interface
interface IContentType {
uniqueId: string;
name: string;
title: ILocales | string;
categoryTermSet: string;
categoriesColor: ICategory[];
columns: (IColumn | IColumnTaxonomy | IColumnPerson | IColumnLookup)[];
hiddenColumnsIds: string[];
searchProperties: string[];
isBase?: boolean;
contentTypeBase?: IContentTypeBase;
listInstance?: IListInstance;
listTemplates?: IListTemplate[];
assemblyName?: string;
refinableManagedProperties?: IRefinableManagedProperties[];
hasPreview?: boolean;
}
Example
{
"uniqueId": "0x0101009D1CB255DA76424F860D91F20E6C411800B1EF6AD499829C42B5F919BB8EBBFB31",
"name": "TogoNews",
"title": {
"default": "Articles",
"en-US": "Articles",
"es-ES": "ArtĂculos"
},
"categoryTermSet": "2bd88977-3669-4cb4-a022-9fbcc7b5faa1",
"contentTypeBase": {
"uniqueId": "0x0101009D1CB255DA76424F860D91F20E6C4118",
"name": "SitePage",
"baseType": "Page",
"categoryTermSet": null,
"contentTypeBase": null,
"listInstance": null,
"listTemplates": [
{
"id": 119,
"name": "SitePages",
"description": null,
"allowCreateListInstance": false
}
],
"columns": [],
"isBase": true,
"searchProperties": ["CanvasContent1OWSHTML", "BannerImageUrlOWSURLH"]
},
"listInstance": {
"title": "SitePages",
"listTemplate": {
"id": 119,
"name": "SitePages",
"description": "SitePages",
"allowCreateListInstance": false
},
"webhook": {
"clientState": null,
"notificationUrl": null
}
},
"columns": [
{
"termSet": "2bd88977-3669-4cb4-a022-9fbcc7b5faa1",
"multiple": false,
"uniqueId": "88069965-7aeb-43b4-a939-c7577a286867",
"title": "Category",
"name": "TogoNewsCategory",
"description": "News Category",
"type": "ManagedMetadata",
"defaultValue": "",
"isBase": true,
"searchProperty": "owstaxIdTogoNewsCategory"
},
{
"termSet": "8ed7ce38-efb7-4d06-97ea-c211d216cdc7",
"multiple": true,
"uniqueId": "fa99d158-c7f1-4474-ab98-801009d80b56",
"title": "Tags",
"name": "TogoTags",
"description": "Tags",
"type": "ManagedMetadata",
"defaultValue": "",
"isBase": true,
"searchProperty": "owstaxIdTogoTags"
},
{
"uniqueId": "9952e56b-1b1a-4d9d-84a5-8ae8731a833a",
"title": "Image URL",
"name": "TogoImageUrl",
"description": "Image URL",
"type": "Text",
"defaultValue": "",
"isBase": true,
"searchProperty": "TogoImageUrlOWSTEXT"
},
{
"uniqueId": "5032aed8-eb8f-4fa9-8b74-289664dfde54",
"title": "Highlight",
"name": "TogoHighlight",
"description": "Highlight",
"type": "Checkbox",
"defaultValue": "False",
"isBase": true,
"searchProperty": "TogoHighlightOWSBOOL"
},
{
"uniqueId": "3d030d44-f780-44f4-944b-fcfa41838520",
"title": "Banner",
"name": "TogoBanner",
"description": "Banner",
"type": "Checkbox",
"defaultValue": "",
"isBase": false,
"searchProperty": "TogoBannerOWSBOOL"
},
{
"multiple": false,
"list": "UserInfo",
"showField": "ImnName",
"userSelectionMode": "PeopleOnly",
"uniqueId": "b36af092-488b-473f-a3ba-410a1c94326a",
"title": "Author",
"name": "TogoAuthor",
"description": "Author",
"type": "Person",
"defaultValue": "",
"isBase": true,
"searchProperty": "TogoAuthor"
},
{
"termSet": "b49f64b3-4722-4336-9a5c-56c326b344d4",
"multiple": true,
"uniqueId": "0d3a7737-cb00-47dc-8ce4-4bed1647af23",
"title": "Locations",
"name": "TogoLocations",
"description": "Locations",
"type": "ManagedMetadata",
"defaultValue": "",
"isBase": true,
"searchProperty": "owstaxIdTogoLocations"
},
{
"termSet": "8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f",
"multiple": true,
"uniqueId": "763ae940-2be2-40f1-a493-7184116f6bcc",
"title": "Departments",
"name": "TogoDepartments",
"description": "Departments",
"type": "ManagedMetadata",
"defaultValue": "",
"isBase": true,
"searchProperty": "owstaxIdTogoDepartments"
},
{
"uniqueId": "39e1fb59-0488-4a7a-8d77-7cd960fb9d71",
"title": "Publishing Date",
"name": "TogoPublishingDate",
"description": "Publishing Date",
"type": "DateTime",
"defaultValue": "",
"isBase": true,
"searchProperty": ""
},
{
"uniqueId": "7ba02286-2c39-4680-80d8-929e3b3b71e0",
"title": "Due Date",
"name": "TogoDueDate",
"description": "Due Date",
"type": "DateTime",
"defaultValue": "2099-12-31T00:00:00Z",
"isBase": true,
"searchProperty": ""
}
],
"hiddenColumnsIds": [
"5032aed8-eb8f-4fa9-8b74-289664dfde54",
"3d030d44-f780-44f4-944b-fcfa41838520"
],
"categoriesColor": [
{
"uniqueId": null,
"contentTypeId": null,
"termSetId": "460c3d81-582a-4556-9f4e-0bbe44de5dd5",
"color": "rgb(255, 0, 0)"
},
{
"uniqueId": null,
"contentTypeId": null,
"termSetId": "17bda68c-d16b-400b-9e69-df7173ee6243",
"color": "rgb(103, 133, 193)"
}
],
"defaultCategoryColor": "#DCB221",
"isBase": true,
"searchProperties": [
"owstaxIdTogoNewsCategory",
"owstaxIdTogoTags",
"TogoImageUrlOWSTEXT",
"TogoHighlightOWSBOOL",
"TogoAuthor",
"owstaxIdTogoLocations",
"owstaxIdTogoDepartments",
"CanvasContent1OWSHTML",
"BannerImageUrlOWSURLH"
],
"refinableManagedProperties": [
{
"name": "TogoNewsCategory",
"title": {
"default": "News category",
"en-US": "News category",
"es-ES": "CategorĂa de noticia",
"fr-FR": null
}
}
],
"hasPreview": true,
"assemblyName": null
}
Properties
uniqueId
Unique identifier.
-
Type:
string
-
Required: Yes
name
Internal name.
-
Type:
string
-
Required: Yes
categoryTermSet
Id of the Term Set where the categories will be obtained.
-
Type:
string
-
Required: Yes
categoriesColor
Array of categories which have the informed color.
-
Type:
ICategory[]
-
Required: Yes
columns
Columns that will be created with the content type.
-
Type: (
IColumn
|IColumnTaxonomy
|IColumnPerson
|IColumnLookup
)[] -
Required: Yes
assemblyName
Name of the dll to use, only if you use the old model.
-
Type:
string
-
Required: Yes
hiddenColumnsIds
Used to hide columns in the sharepoint OOTB form. It also hides them in the library so that the fields cannot be modified from there or from the pageDetails.
-
Type:
string[]
-
Required: Yes
searchProperties
It is used to retrieve the values of the indexed columns, each site column is automatically created a managed property in the search service, when making a query with the name of this property the search returns the value of the said column.
-
Type:
string[]
-
Required: Yes
title
Text to identify the content type.
-
Type:
string |
ILocales
-
Required: No
isBase
Indicates if the content type belongs to the core of Syntphony.
-
Type:
boolean
-
Required: No
-
Base content types:
TOGONews, TOGOAnnouncements, TOGOApplications, TOGOCommunities, TOGODocuments
contentTypeBase
Required if the content type is not base. The columns of the indicated content type are inherited.
-
Type:
IContentTypeBase
-
Required: No
listInstance
Name of the list.
-
Type:
IListInstance
-
Required: No
listTemplates
Array of list templates.
-
Type:
IListTemplate[]
-
Required: No
refinableManagedProperties
Array with all the columns that you want to use as refiners in the search. These refiners will be added to the ones that the product has configured by default.
-
Required: No
-
Default refiners:
ContentType, FileType, LastModifiedTimeForRetention, TogoAuthor, TogoEditor, TogoTags, TogoSiteTitle
hasPreview
If it has a preview, it will open a panel when clicking, for example, on a notification, otherwise, it will redirect to a URL.
-
Type:
boolean
-
Required: No