Dean Leigh
11/12/2024, 11:08 AMKevin Jump
11/12/2024, 11:18 AMDean Leigh
11/12/2024, 11:30 AMKevin Jump
11/12/2024, 11:53 AMKevin Jump
11/12/2024, 11:56 AMKevin Jump
11/12/2024, 11:57 AMDean Leigh
11/12/2024, 12:14 PMSebastiaan
11/12/2024, 12:26 PMSebastiaan
11/12/2024, 12:26 PMDean Leigh
11/12/2024, 1:49 PMDean Leigh
11/12/2024, 1:51 PMcsharp
    var contentService = Services.ContentService;
    var allContent = contentService.GetRootContent().DescendantsOrSelf();
    
    foreach (var content in allContent)
    {
        if (content.HasProperty("oldPropertyAlias") && content.HasProperty("newPropertyAlias"))
        {
            var oldValue = content.GetValue("oldPropertyAlias");
            content.SetValue("newPropertyAlias", oldValue);
            contentService.SaveAndPublish(content);
        }
    }
At least it is only copying so I can test it's all there.Sebastiaan
11/12/2024, 1:53 PMSebastiaan
11/12/2024, 1:54 PMSebastiaan
11/12/2024, 1:54 PMNik
11/13/2024, 12:07 PMNik
11/13/2024, 12:07 PMNik
11/13/2024, 12:08 PMKaspar Boel Kjeldsen
11/13/2024, 12:38 PMKaspar Boel Kjeldsen
11/13/2024, 12:38 PMDean Leigh
11/13/2024, 12:42 PMDean Leigh
11/13/2024, 12:47 PMKaspar Boel Kjeldsen
11/13/2024, 12:48 PMDean Leigh
11/13/2024, 12:50 PMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by