Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Content types are created from schemas. See How do I create a schema?

  1. In the global menu, select Develop > Schema.

  2. Click Add (+) to start a new schema. Select Content as the schema type and click Add.

  3. The following image shows a partial Edit Schema form.

    Note: You can cut and paste the following sample code to the Schema Editor and modify the fields that appear when you create a content item:

    Code Block
    {
      "fields" : [
                  {
                    "key"        : "speaker",
                    "label"      : "Speaker voice",
                    "isDefault"  : false,
                    "validation" : [{ "required" : "false" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  },
                  {
                    "key"        : "source",
                    "label"      : "Source",
                    "isDefault"  : false,
                    "validation" : [{ "required": "true" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  },
                  {
                    "key"        : "tip",
                    "label"      : "Nutrition Tip",
                    "isDefault"  : true,
                    "validation" : [{ "required": "true" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "richtext",
                    "type"       : "Object"
                  },
                  {
                    "label"      : "Title",
                    "key"        : "title",
                    "isDefault"  : false,
                    "validation" : [],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "String"
                  },
                  {
                    "label"      : "Tags",
                    "key"        : "tags",
                    "isDefault"  : false,
                    "validation" : [],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  }
                 ]
  4. Click Save (check mark).

...