Jacob Pretorius
Jul 1, 2019
(6 votes)

How to easily copy content between pages

Working with large Episerver builds often comes with unique challenges both from the content management side and from a business rule perspective.

Recently one of our clients at Zone decided they wanted to update and restructure large parts of their site layout. Based on other external factors, this would create some extra editor overhead to keep everything running smoothly.

Occasionally the editors will need to manually copy content between pages to align marketing strategies. I saw this as an interesting problem that we could make as painless as possible with a custom admin plugin.

The plugin allows editors to choose which language they want, and if they only want culture specific properties shown. To make it as intuitive as possible they have two content trees, one for the 'source' and one for the 'destination' page.

Based on the source page selection and culture-specific setting, the available properties for that page type will be loaded automatically.

The plugin isn't sensitive to which types of pages are selected; the only requirement is that the selected properties are the same type and have the same name on both source and destination page types.

By default the plugin will create a new draft on the 'destination' page if there aren't any issues with the copy process. If there is an outstanding draft on the 'destination' page already, the plugin will let the editor know and not make any further changes to that draft.

Editors can also choose to skip the draft process and overwrite any outstanding drafts by copying the content and publishing the changes immediately (assuming there are no errors during copying). To prevent misuse of this I've decided to make the plugin an admin plugin and not put it in the CMS editor interface.

All in all, I think this plugin is very useful for managing complex content strategies with ease.

This plugin can be installed using NuGet from the Episerver feed by searching for Zone.Epi.ContentCopy.

As usual the code for this plugin can also be found on GitHub if you want to change any of the standard features or build it out more. Thanks to Raffaele Millo for helping determine exactly how it should work.

Jul 01, 2019


KennyG Jul 1, 2019 09:26 PM

Very cool!

Per Nergård
Per Nergård Jul 22, 2019 02:02 PM

Nice! One thing less on my ToDo list :)

Jacob Pretorius
Jacob Pretorius Aug 14, 2019 08:06 AM

Haha good to hear that Per :)

Please login to comment.
Latest blogs
Implementing EmbeddedLocalization in Optimizely CMS 12

My previous post on translation (Translating Optimizely CMS 12 UI components) gives an overview of how to implement the FileXmlLocalizationProvider...

Eric Herlitz | Jan 27, 2023 | Syndicated blog

Breaking changes in EPiServer.CMS.TinyMce 4.0.0

After upgrading to the latest version of EPiServer.CMS.TinyMce, the dropdown with formats disappears. Learn how to get it back!

Tomas Hensrud Gulla | Jan 27, 2023 | Syndicated blog

Translating Optimizely CMS 12 UI components

Optimizely CMS 12 have been out for a while now, but still some elements haven't been properly translated resulting in a GUI defaulting to english....

Eric Herlitz | Jan 26, 2023 | Syndicated blog

Image preview in Optimizely CMS12 all properties view

With these simple steps, you can now see an Image and its Metadata, including size and dimensions, when editing an Image property in Optimizely...

Tomas Hensrud Gulla | Jan 26, 2023 | Syndicated blog