Block Data Model

Blocks defined by content templates in the current site. Acts as a template for Content Blocks that will be attached to Content items.

Sample JSON Data

      {
        "data": {
          "type": "blocks",
          "id": "a46228f0-d662-439e-9958-eb7ff4682e3c",
          "attributes": {
            "title": "Title",
            "data-type": "text",
            "var-name": "title",
            "description": null,
            "required": true,
            "inline": false,
            "position": 1,
            "created-at": "2012-04-23T18:25:43.511Z",
            "updated-at": "2012-04-23T18:25:43.511Z"
          }
        }
      }

Attributes

Attribute Type Required Description
title string Yes Title of block.
data-type string Read-only Type of data that the block will record. Valid values are text, date, image, video, audio, file, and link.
var-name string Yes Name of variable to reference this block as in the content template's related displays.
description string No Brief description that will appear as hints for this field for content authors in the editor interface.
required boolean Yes Whether or not content blocks based on this block are required to be filled in.
inline boolean No If the type is set to text, passing true for this option specifies that the text is not to be wrapped in any block-level elements like <div> or <p> tags. This allows you to be able to mark up this text within predefined block-level elements in your display templates, but with the ability for content authors to still use inline-formatting tags like <strong> and <em>. If no value is provided, defaults to false.
position integer Yes Order in which to display content blocks based on this block within forms.
created-at date Read-only Records when block was created, localized to the current logged in user’s time zone.
updated-at date Read-only Records when block was last updated, localized to the current logged in user’s time zone.

Relationships

None.

Related