HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


Optimizely Content Management System (CMS) content is built-up by models with properties that store and present data. You can use many built-in property types in your models and also create your own property types.

## Common property types

What you want to createSolutionEditing experienceHints and tips
Plain short text`String` propertyOne row inputControl the allowed length with the `StringLength` attribute. Use custom tag to control the containing tag, such as using a H1 for the main header for the page.
Plain long text`String` property with UIHint.TextareaText areaControl the allowed length with the `StringLength` attribute.
Html`XHtmlString` propertyA TinyMCE HTML editor 
Integer value`Int` propertyA number sliderControls other rendering, such as the number of items in a list. Control the min and max values with the `Range` attribute.
Date and time`DateTime` propertyA date and time pickerControl the min and max values with the `Range` attribute.
Double`Double` propertyCheck editorControl the min and max values with the `Range` attribute.
Boolean`Boolean` propertyCheck box 
Page type`PageType `property Filter items in a list, and so on.
BLOB `Blob` property Hold binary data (such as an image). Route to a BLOB with pattern <Url to content>/BlobPropertyName.

## Work with other content

To refer to existing content, use the `Link` or `LinkCollection` to create internal or external links.

  • Use `ContentArea` to display content from other content.

  • Use `ContentReference`, `ContentReferenceList`, or `URL` to link to a single content of a specified type.

  • Use the `AllowedTypes` attribute to further restrict the kind of links that are possible to add to a property, (although there are a few known limitations).

Use a content reference with many different UI hints to select different entities in CMS, such as a block, a media item, a block folder, or a media folder.

What you want to createSolutionEditing experienceHints and tips
Link to a page`PageReference` propertyContent picker with <br>drag and drop support 
Link to a media file of any type`ContentReference` property <br>with `UIHint.MediaFile`Content picker with <br>drag and drop supportLink to any file in the media repository. Use `ContentReference` instead to use standard content rendering. (Mostly for backwards compatibility.)
Link to an image`ContentReference` property <br>with `UIHint.Image`Content picker with <br>drag and drop supportLets an editor select content in the media repository by implementing `IContentImage`.
Link to a video`ContentReference` property <br>with `UIHint.Video`Content picker with <br>drag and drop supportLets an editor select content in the media repository by implementing `IContentVideo`.
Link to a media file with the possibility to append information in the URL`Url` property with <br>`UIHint.MediaFile` or <br>`UIHint.Image` or <br>`UIHint.Video`Content picker with <br>drag and drop supportEach link can be an item inside CMS, such as pages or media but also external URLs. Use URL instead of `ContentReference` if you want to add information, such as query string parameters to control size.
Content area`ContentArea` property  
URL`Url` propertyLink dialog with drag and drop support 
Link to multiple external and/or internal resources`LinkItemCollection`  <br>propertyLink collection editor with drag and drop supportDoes not support `AllowedTypesAttribute`.
Link to multiple internal pages, media file or other content type.`ContentReferenceList` propertyContent picker with <br>drag and drop supportSupports `AllowedTypesAttribute`.

## Select predefined values

You can use the following solutions to create** drop-down lists** and **check box lists**:

What you want to createSolutionEditing experienceHints and tips
Select a single item from a relatively short list of options`String`/`Int` property with [SelectOne](🔗) attributeLink to implementation <br>page 
Select several items from a relatively short list of options`String`/`Int` property with [SelectMany](🔗) attributeLink to implementation <br>page 
Select a single item from a relatively long list of options`String`/`Int` property with [AutoSuggestion](🔗) attributeLink to implementation <br>pageUse with caution because the auto-suggestion editor creates requests to the server.

## Validation attributes

CMS supports the following validation attributes that are part of the .NET:

  • `Range`

  • `StringLength`

  • `RegularExpression`

  • `EmailAttribute`

You can create custom attributes that implement either `ValidationAttribute`. See [Writing custom attributes](🔗).