Introduction
Included in the EPiServer CMS 5 R2 release is the Dynamic Content functionality.
EPiServer CMS Dynamic Content allows developers to create blocks of functionality in code which will then be utilized by an editor working on a page in the HTML editor. This means that editors are no longer restricted to working with static content and can make their pages more interactive.
A Dynamic Content class can be thought of as a cut down version of an EPiServer template page, the implementation doesn't define a whole page rather just a small section of it. User Controls can be used to implement the user interface part of a dynamic content object.
Dynamic Content in short
- Enables the developer to render the contents with any .NET derived type of control
- Dynamic Content is fully integrated into the EPiServer core and improves performance since the parsing engine is optimized for it
- Uses hashes to make sure only EPiServer code can update the contents.
- Fully adapts ASP.NET functionality.
Devloping Dynamic Content
One suggested workflow when developing Dynamic Content
- Create a .NET class that implements the IDynamicContent interface.
- Optionally create a control to render the dynamic content user interface.
- Register the dynamic content class in the web.config file.
- The editor creates an instance of the dynamic content class, sets it's properties and places it as desired in the EPiServer HTML editor.
- When the page is rendered in view mode, EPiServer replaces the dynamic content design time markup with the actual XHTML output of the dynamic content class or it's delegated control.
Built in Dynamic Content Control - Page Property
Shipped with EPIServer CMS 5 R2 is the Dynamic Content control called ‘Page Property’. This useful control makes it possible to fetch properties from another page. Information such as contact information, that might be repeated on many different parts of the web site can bestored in one location, and re-used throughout the entire web siteDynamic Content Code Examples
Dynamic Content code examples can be found on EPiServer World.
See Also
For further information see the Tech Note on Dynamic Content. Articles on Dynamic Content can be found on EPiServer World.