I've been looking around for some code that will do a deep clone of a Content Area from one page/block to another. I already have something similar on the SetDefaultValues that works for only shared blocks but I wondered if anyone had any examples or code that can do a more deep clone.
E.g I have a setting in our main site settings that's a combination of shared blocks and page level blocks. I want a service/function that can deep clone from this configuration ContentArea on the settings to another, copying any shared references but also recreating all the blocks on that page/block level with all the values.
I can see that in the docs https://world.episerver.com/documentation/class-library/?documentId=cms/7/ab3bbfb1-5fdd-6650-3ebf-5e59f8f98490 there is a Copy method but I wondered if anyone had created something or used this without having to re-invent the wheel?
I think Episerver language mananger has copy functionality (when you are creating new content in new langauge) - maybe there are some code cheats to look up?
Thanks Valdis, I've actually managed to accompish this. At the moment it's on a specific content type but I'm going to make it generic and post about it when I get the chance. I just ended
Work pretty well apart from a weird exception about a properly not allowing nulls, but its a property that doesn't exisit anywhere lol. At the moment it's wrapped but I want to try and resolve it.