Content Template Data Model

Templates on which to base content items in the current site.

Sample JSON Data

      {
        "data": {
          "type": "content-templates",
          "id": "17677fff-da40-44e9-ac8c-46a0662383b2",
          "attributes": {
            "template-type": "Custom",
            "title": "Staff Bio",
            "var-name": "staff_bio",
            "description": "Staff biography to include in listings of staff members.",
            "unique": false,
            "folder-name": "staff_bio",
            "icon-title": "font",
            "created-at": "2012-04-23T18:25:43.511Z",
            "updated-at": "2012-04-23T18:25:43.511Z"
          },
          "relationships": {
            "blocks": {
              "data": [
                {
                  "type": "blocks",
                  "id": "20be3ce8-2838-4cd4-889f-80ab0959c5ce"
                }
              ]
            },
            "displays": {
              "data": [
                {
                  "type": "displays",
                  "id": "b69ec41d-db93-4cd4-862a-db61de59e095"
                }
              ]
            },
            "default-display": {
              "data": {
                "type": "displays",
                "id": "49cab6b3-0726-4742-97f6-786a63d1d51a"
              }
            }
          }
        }
      }

Attributes

Attribute Type Required Description
template-type string Read-only Type of content template. There are 2 “primitive" types: Text and Media that are system-generated. Any content templates created through the Content Templates endpoint will be assigned a type of Custom.
title string Yes Title of content template.
var-name string No Variable name used to reference content template in layout region configurations. If not provided on creation, a var-name will be created based on the value of title.
description string No Description of the content template to display in editor interfaces.
unique boolean No Set this to true if if the content template can only be used once on any given page. If no value is provided on creation, unique will default to false.
folder-name string No Overrides the name of the theme folder within content_templates that will contain .liquid template files for this content template’s displays. If not provided on creation, defaults to the value of var_name.
icon-title string Yes CSS class name of Font Awesome icon used to represent the content template. Note that this should exclude the fa- prefix. For example, if the Font Awesome icon class is fa-beer, then this should be represented by the string beer.
created-at date Read-only Records when content template was created, localized to the current logged in user’s time zone.
updated-at date Read-only Records when content template was last updated, localized to the current logged in user’s time zone.

Relationships

Title Type Required Description
blocks array Read-only Blocks defined by this content template.
displays array Read-only Displays defined by this content template.
default-display object No Display designated as the default for this content template.

Related