Property schemas
Describes the schemas for built-in properties in Optimizely Content Management System (CMS) (SaaS).
The standard primitive types in GraphQL includes types like String
, Int
, Boolean
, DateTime
and Float
. The Optimizely Graph also include the type JSON
. CMS then expands the property types with some additional types as described here.
Link
Link is a property that is used when a content item has a link to another content item. It is modeled in the CMS (SaaS) UI as a Content property of type LinkItem or Link Collection (or in integration API as a component with content type link
, with optional format LinkCollection
). The graph schema for Link is defined as:
Property | Type | Description |
---|---|---|
url | ContentUrl | The URL representing the link. |
title | String | The title for the link. |
text | String | The link text. |
target | String | Optional setting that specifies how the link should be opened. |
ContentReference
ContentReference is a property that is used when a content item has a reference to another content item. It is modeled in CMS UI as a Content property of type Content Reference (or in integration API as type contentReference
). The graph schema for ContentReference is defined as:
Property | Type | Description |
---|---|---|
key | String | The key to the referenced content instance. |
url | ContentUrl | The URL to the referenced content instance. |
ContentUrl
ContentUrl is a property that is used to represent URLs for a content item. It is used for metadata, like _metadata.url, and for content type properties modeled in CMS UI as a Link of type URL (or in integration API as type URL). The graph schema for ContentUrl is defined as:
Property | Type | Description |
---|---|---|
type | String | Describes the type for default value. Possible values are:
|
default | String | The default URL for the content instance. The value is dependent on type . For media content items, the default value is an absolute URL with authority set to the CMS (SaaS) application. |
hierarchical | String | The path for the content item is based on the hierarchical structure within CMS (SaaS). |
internal | String | A permanent URL to the content item. This format is used within the integration API to reference content items. |
base | String | The authority for the content item. This is dependent on the application configuration with CMS (SaaS). |
URL resolve
The URL for a content item is indexed in relation to the defined applications. If a content item does not belong to an application (that is, it is not under a StartPage for an application), then the hierarchical path will be resolved from the Root page, and there will be a language segment in the URL. There is no base
for the URL.
If the content item belongs to an application (is located under a start page for an application), then the hierarchical path is resolved from that application's start page. The URL indexing will then select a host and base depending on the hosts defined for the application, given the locale of the current content item. If the selected host has a language mapping then is the language segment omitted from the hierarchical path.
The base for media items is the CMS (SaaS) application. So media is served from CMS (SaaS) (or mostly from the CDN in front of CMS (SaaS)).
RichText and SearchableRichText
RichText is a property that is used when a text property in the CMS (SaaS) UI is selected to be of type XHTML string (or a string property in integration API is defined with format html
). In graph is a rich text property defined as either RichText
or SearchableRichText
dependent on the indexingType
setting on the corresponding content type property. If the property is marked as searchable then SearchableRichText is used. Then the property's value will also be indexed to be included in free text searches. The graph schema for RichText and SearchableRichText is defined as:
Property | Type | Description |
---|---|---|
html | String | The rich text is in HTML format. |
json | JSON | The rich text in a slate-based JSON format. |
Slate format
The JSON format for rich text is based on the slate format. It is based on nodes with a field type
specifying which element type it is, with optional additional attributes describing the style. The leaf nodes are the actual text elements with a field text
with the text value and optionally additional attributes describing the style of the text.
Updated 3 months ago