Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
This document contains an example of how to create a dynamic content plug-in by implementing the IDynamicContentView interface.
For convenience we inherit DynamicContentBase which implements IDynamicContentBase for us, we then add IDynamicContentView which supports both MVC and Web Forms.
using System;
using System.IO;
using EPiServer.Core;
using EPiServer.DynamicContent;
namespace CodeSamples.DynamicContent
{
[DynamicContentPlugIn(
DisplayName = "ClassDynamicContentPlugin",
Description = "Example of a Dynamic Content plugin as a simple class.")]
public class ClassDynamicContentPlugin : DynamicContentBase, IDynamicContentView
{
public ClassDynamicContentPlugin()
{
}
public void Render(TextWriter writer)
{
writer.Write("<div>Hello World</div>");
}
}
}
Last updated: Feb 23, 2015