HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Migrate Dynamic Content to blocks

Describes how to programmatically insert content into XHTML property values.



Dynamic content is deprecated in Optimizely Content Management System (CMS 12). Use blocks instead. While existing solutions will continue to work, you should not build new solutions on this API. It will be phased out in the future.

Optimizely Dynamic Content is a feature that allows developers to programmatically insert content into XHTML property values. Optimizely Dynamic Content is installed via the optional NuGet package EPiServer.DynamicContent. However, the feature is now deprecated and is not supported by Optimizely TinyMCE v 2. It is therefore recommended that you use blocks instead.

If your site is using Dynamic Content, you can use the procedures in this topic to migrate from Dynamic Content to blocks.


  1. Identify and iterate the items that use dynamic content.
  2. Get the original content saved by the dynamic content control and extract the content for migration.
  3. Create a new block to render the Dynamic Content control.
  4. Create a block to replace the Dynamic Content control at the page level.
  5. Update the XHTMLstring property.


You can find a working solution on our GitHub on the branch doc/migrating-dynamic-content.

Just clone our repository, check out that branch and run as described in the Readme file. The approach defined above is implemented as a scheduled job. All it does is identifying all instances of FooDynamicContent and rewriting them to instances of FooBlock.