Content Types - Bloomreach Experience - The Headless Digital Experience Platform Built for Commerce

Content Types

Content type is a generic term indicating a definition of a class of content items. Document types and FieldGroup types are all content types. 

document type defines the data structure and the editing template of a class of documents. A document type can contain both primitive and fieldgroup type fields. A fieldgroup type defines the data structure and the editing template of a reusable block of document fields. A fieldgroup type can contain both primitive and fieldgroup type fields. An instance of a fieldgroup type can only exist within a document instance.

Below you can see the properties of document and fieldgroup types

Property Name Property Type Required Description Examples
name String yes The name of the document of fieldgroup type Banner, TitleAndText, NewsArticle
type String yes Type of the content type. Valid values: 'Document',  'FieldGroup'  
fields Array of fields yes Array of fields of this document or fieldgroup type. See Content Type Fields  
presentation/layout String yes

Layout specification for the fields of the document or fieldgroup type. Valid values: 

'one-column' (all fields vertically in one column)
'two-column' (fields split in 2 columns, left column is wide, right is narrow)
'three-column' (fields split in 3 columns)
'horizontal' (all fields in one row)
'two-column-mirrored' (same a two-column but left column is narrow, right is wider).

 

The ‘layoutColumn’ property on the field sets in which column the field takes place. The order of the fields in a column is determined by the index of fields in the "fields" attribute.

two-column, one-column

An example document type can be seen below:

{
  "name": "example",
  "type": "Document",
  "fields": [
    {
      "name": "stringField",
      "required": true,
      "multiple": true,
      "type": "String",
      "defaultValue": [
        "Blogtitle1",
        "Blogtitle2"
      ],
      "validations": {
        "maxLength": 10
      },
      "presentation": {
        "caption": "Title",
        "hint": "Hint for string field",
        "layoutColumn": 1,
        "displayType": "Simple"
      }
    },
    {
      "name": "dateField",
      "required": true,
      "type": "Date",
      "defaultValue": [
        "2007-12-03T10:15:30.00Z"
      ],
      "presentation": {
        "caption": "Date Field",
        "hint": "Hint for date field",
        "layoutColumn": 2,
        "timeSelectable": true
      }
    }
  ],
  "presentation": {
    "layout": "two-column"
  }
}

 

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?