Skip to content

Instantly share code, notes, and snippets.

@joeriks
Created June 23, 2012 13:45
Show Gist options
  • Save joeriks/2978346 to your computer and use it in GitHub Desktop.
Save joeriks/2978346 to your computer and use it in GitHub Desktop.
Ghost copy a Umbraco node (in document publish event)
var d = new Document(copyOfNodeId);
var ghost = d.ToXml(umbraco.content.Instance.XmlContent, true);
var p = umbraco.content.Instance.XmlContent.GetElementById(copyToParentNodeId);
p.AppendChild(ghost);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment