Property Types Reference
Corecms
Property type reference
Section titled “Property type reference”String types
Section titled “String types”| C# Type | CMS Type | Editor | Graph Type | Max Length |
|---|---|---|---|---|
string | PropertyString | Single-line text | String | 255 |
string with [UIHint(UIHint.Textarea)] | PropertyLongString | Multi-line text | String | Unlimited |
XhtmlString | PropertyXhtmlString | Rich text (TinyMCE) | RichText | Unlimited |
Numeric types
Section titled “Numeric types”| C# Type | CMS Type | Editor | Graph Type |
|---|---|---|---|
int | PropertyNumber | Number input | Int |
int? | PropertyNumber | Number input (nullable) | Int |
double | PropertyFloatNumber | Decimal input | Float |
double? | PropertyFloatNumber | Decimal input (nullable) | Float |
Boolean
Section titled “Boolean”| C# Type | CMS Type | Editor | Graph Type |
|---|---|---|---|
bool | PropertyBoolean | Checkbox | Bool |
bool? | PropertyBoolean | Checkbox (nullable) | Bool |
Date and time
Section titled “Date and time”| C# Type | CMS Type | Editor | Graph Type |
|---|---|---|---|
DateTime | PropertyDate | Date/time picker | DateTime |
DateTime? | PropertyDate | Date/time picker (nullable) | DateTime |
Content references
Section titled “Content references”| C# Type | CMS Type | Editor | Graph Type | Use for |
|---|---|---|---|---|
ContentReference | PropertyContentReference | Content picker | ContentModelReference | Link to one content item |
ContentArea | PropertyContentArea | Drag-drop area | [ContentAreaItemModel] | Composable block region |
IList<ContentReference> | PropertyContentReferenceList | Multi-picker | [ContentModelReference] | Ordered list of references |
URL and link types
Section titled “URL and link types”| C# Type | CMS Type | Editor | Graph Type |
|---|---|---|---|
Url | PropertyUrl | URL picker | String |
LinkItemCollection | PropertyLinkCollection | Link list editor | [LinkItemNode] |
Selection types
Section titled “Selection types”| C# Type | Attribute | Editor | Graph Type |
|---|---|---|---|
string | [SelectOne] | Dropdown | String |
string | [SelectMany] | Checkbox list | String (comma-separated) |
Media types
Section titled “Media types”| C# Type | CMS Type | Editor | Stores |
|---|---|---|---|
Blob (on MediaData) | PropertyBlob | File upload | Binary file data |
ContentReference with [UIHint(UIHint.Image)] | PropertyContentReference | Image picker | Reference to image |
ContentReference with [UIHint(UIHint.Video)] | PropertyContentReference | Video picker | Reference to video |
Collection types
Section titled “Collection types”| C# Type | CMS Type | Editor | Notes |
|---|---|---|---|
IList<string> | PropertyStringList | Tag editor | Stored as string array |
CategoryList | PropertyCategory | Category tree | Built-in category system |
Graph type mappings
Section titled “Graph type mappings”When content is indexed in Optimizely Graph, property types are automatically mapped to GraphQL types:
| CMS Property | GraphQL Type | Queryable | Filterable | Sortable |
|---|---|---|---|---|
string | String | Yes | Yes | Yes |
XhtmlString | RichText (with .html, .plaintext) | Full-text | No | No |
int | Int | Yes | Yes | Yes |
double | Float | Yes | Yes | Yes |
bool | Bool | Yes | Yes | No |
DateTime | DateTime | Yes | Yes | Yes |
ContentReference | ContentModelReference | Yes | By ID | No |
ContentArea | [ContentAreaItemModel] | Nested query | No | No |
Url | String | Yes | Yes | No |
XhtmlString in Graph
Section titled “XhtmlString in Graph”XhtmlString (rich text) properties expose multiple sub-fields in Graph:
query { ArticlePage { items { Body { html # Full HTML markup plaintext # Plain text (HTML stripped) } } }}ContentArea in Graph
Section titled “ContentArea in Graph”ContentArea properties return arrays of typed content:
query { StartPage { items { MainContentArea { ... on TestimonialBlock { Quote AuthorName } ... on CallToActionBlock { Heading ButtonText } } } }}Related
Section titled “Related”- Define Properties — How to configure properties
- Content Type Attributes — Attribute reference
- Graph Query Syntax — GraphQL query reference