Our customer had a request for possibility to copy or duplicate an item without a previous language versions. Only the latest versions have to be created.

Check my solution on http://sitecore-masters.com/en/2016/11/28/duplicate-item-without-previous-versions. Do you know any other solution?

2 Answers 2


Here is an another example. What I am not happy that reflection and message collection are being used. But it can be as workaround for quick solution.


      <command name="custom:CopyLatestVersionTo" type="Sitecore.CopyTo.CopyLatestVersionTo, Sitecore.CopyTo" />
          <processor mode="on" type="Sitecore.CopyTo.Pipelines.CopyLatestTo, Sitecore.CopyTo" method="OnlyLatestVersion" patch:after="processor[@type='Sitecore.Shell.Framework.Pipelines.CopyItems,Sitecore.Kernel'][@method='Execute']" />


public class CopyLatestVersionTo : Sitecore.Shell.Framework.Commands.CopyTo
    public override void Execute(CommandContext context)
        var args = new CopyItemsArgs();
        var instance = Activator.CreateInstance(typeof(Sitecore.Shell.Framework.Items));
        var methodInfos = new List<MethodInfo>(instance.GetType().GetMethods(BindingFlags.Static | BindingFlags.NonPublic));
        var method = methodInfos.FirstOrDefault(m => m.Name == "Start" && m.GetParameters().Length == 4);
        method.Invoke(instance, new object[] {"uiCopyItems", args, context.Items[0].Database, context.Items});


 public class CopyLatestTo
    protected virtual void OnlyLatestVersion(CopyItemsArgs args)
      var pipelineMessages = args.GetMessages(PipelineMessageFilter.Informations);
      if (pipelineMessages != null && pipelineMessages.Any(m=>m.Text == "command:copylatest"))
        var copies = args.Copies;
        foreach (var copy in copies)
          var currentVersion = copy.Versions.GetLatestVersion();
          foreach (var itemVersion in copy.Versions.GetVersions(true))
            if (!itemVersion.Version.Number.Equals(currentVersion.Version.Number))

Menu Item: "/sitecore/content/Applications/Content Editor/Context Menues/Default/Copying/Copy Latest To"

enter image description here

enter image description here

Result: enter image description here

  • Indeed the efficient solution for this kind of requirement. Simply worked. Thanks!
    – Dash
    Nov 13, 2019 at 8:08

You can use for your requirement this module:


a. It adds a new version to the selected destination language version. If you have 3 versions it's adding just the last one.

b. It copies the content from the source language (context item) to all selected destination language.

c. It has the option of including the child items as well.


  • Hi Climber, your comment is good, but it does not solve my problem. This tool copies only versions inside item. It does not create new item. Nov 30, 2016 at 9:34
  • I added you a solution for one of the cases, you can download the module and decompile the bin files and check how it was made. You can extend it for the second case Nov 30, 2016 at 11:59
  • OK, thanx for it. Nov 30, 2016 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.