Dynamic content can be added to a page by retrieving it from different properties for a page. The source of the dynamic content can be, for instance, text in the “main body” field (the editor area on a page), or the date when a page was saved.
An example of the usage of dynamic content is to display company facts and figures that will be reused on multiple pages on a website. In addition, you can combine dynamic content with a visitor group as described in Personalizing content.
The feature to add dynamic content is not enabled by default, an administrator must enable it in the administration view. If it hasn't been enabled, you will not see the Dynamic content button on the editor toolbar.
Add dynamic content from a Page Property as follows:
- Open the page or block where you want to add the dynamic content and click the Dynamic content button on the editor toolbar.
- In the Dynamic content window, select the plug-in that you want to use as a base for your dynamic content. The Page property plug-in is included in an Episerver CMS standard installation and is used in this example.
- In Page to insert content from, select the page in the tree structure from which you want to display the data.
- In Property to insert content from, select the property on the page that you want to display data from. In this example we will fetch data from the Main body property of a page.
- In Personalization settings, you can click + to select the visitor group you want to have access to the dynamic content. This is optional.
- Click OK. The dynamic content is displayed as a box in the editor area. When this property is updated, all dynamic instances of the property in the content will be automatically updated.
- Preview the content and publish, or schedule for later publishing.
You can cut, copy and paste dynamic content boxes in the editor area, just as you can with any other object. Select the “box” with dynamic content in the editor area, and click the Dynamic content toolbar button to edit. To delete, select the dynamic content box you want to delete and click Delete.
Cut and copy for a dynamic content box in the editor area may work differently depending on the browser you use. You may have to use either the cut and copy editor toolbar buttons, or the right-click and cut and copy of your browser, instead of the keyboard keys. If you have trouble placing the cursor immediately before or after a dynamic content box in the editor area, try using the keyboard arrow keys instead of the mouse.