Content
ContentType attribute
Optimizely Content Management System (CMS) requires the ContentType attribute for all content types. ContentType is in the EPiServer.
Block types and templates
Blocks in Optimizely Content Management System (CMS) are reusable, smaller content parts that editors can add to pages. You can also use blocks in code as properties.
Page types and templates
Optimizely Content Management System (CMS) relates pages, page types, and page templates in the following ways A page type defines a set of properties , for example, page name and publish date. A page is an instance of the .
Content versions
A content item that supports different statuses implements IVersionable . The interface contains a property Status that specifies the current status of the content version.
Content
Content can be pages, blocks, media files, and folders. It can also be catalog content in Optimizely Customized Commerce.
Convert page types for pages
Converting page types is useful for pages that accidentally use the wrong page type or if you want to move existing pages to an enhanced page type. To convert existing pages from one page to another Go to admin view > Content Type tab > Convert Pages .
Create a page programmatically
Decide where you want your page published in the structure of the website by specifying a ContentReference object pointing to the desired parent page, such as the start page, as in the following code Create an empty page with default values, according to the property settings of its page type, by specifying the parent under which to create the page and by specifying the page type After you create an empty page under the specified parent page programmatically, specify page property values before you publish the page, as shown in the following example The code example below shows how to define the user-defined property MainBody The following case shows how to assign a content property when a typed model is not known Publish the newly created page by calling the Save method of the DataFactory class
EditHint in MVC
When you work with Optimizely Content Management System (CMS) content data in MVC (model-view-controller), the view does not have to take the content data object as the view model. The received content data populates a view model that the view uses when a page loads.
Group content types and properties
You can, for example, organize page types in groups to make it easier for editors to select the correct page type when creating pages in edit view. Properties can be grouped and ordered under tabs in the All Properties editing view.
IContentLoader and IContentRepository
EPiServer. IContentRepository is the primary API that defines repository methods for IContent objects.
Inline edit blocks
The inline edit dialog box is designed to be simple yet allow editors to edit a block's most common properties. Optimizely Content Management System (CMS) introduced the InlineBlockEditSettings configuration attribute to apply to your block content type and hide or show the Name and Categories properties.
Multilingual content
You can create a content type that implements the ILocalizable interface in several language versions. For example, pages and blocks have multilingual support, while media and folders do not have multilingual support.
Persist IContent instances
You can save and load IContent instances through IContentRepository . The most typical content instance is a type inheriting PageData .
Refactor content type classes
When you rename a content type class, you create a new content type as long as you do not specify a GUID in the ContentTypeAttribute of the class. If there is no data in the previous content type, it is deleted.
Resolve the currently loaded content context
To resolve the current loaded content context, get an instance of CurrentContentContext object. You should run any custom logic in any of the Content Events It also might be useful to know the current content context in any metadata-aware component, such as an EditorDescriptor , for example.
Select content
The following example, which you can customize, shows how to override the default root of the repository.
Synchronization
During website initialization, the synchronization engine scans and validates available content types and properties created in code or from the Optimizely Content Management System (CMS) admin view. The synchronization engine runs during site initialization and creates a content type in CMS for each ContentType attributed class found in assemblies.
Validate object instances
The validation service implements the EPiServer. Validation.