November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Hey Bjorn,
If I understand you correctly, you need to save internal block values. In this case, you are not supposed to create a writable clone. I think you are supposed to loop through the properties of blockData and set them on the newBranchPage (like newPage.Block.Property[xx] = oldPage.Block.Property[yy]). Since the properties of a local block exist as a part of currentPage, they need to be set on the page.
Let me know if this helps.
I have noticed the same behaviour when you use typed pages as well:
I.E. when setting the local block directly, like:
MyCustomPage.MyLocalBlockProperty = CreateNewBlock();
The values will not persist through save.
But setting the values separately, like:
MyCustomPage.MyLocalBlockProperty.Property1 = Property1Value;
Will work fine.
So, as Marija says above, don't set local blocks on page-property level.
Hi!
I am trying to build a plugin that will make it possible to copy all the pages/blocks from one language to another - to avoid the hazzle of copy-paste when creating a language like UK english from US. At the moment it is working with folders, shared blocks and pages. But somehow I can't get the internal blocks values to get copied alongside the page. I've tried debugging it and the value get's set on the new language branch of the page. But somehow when it is saved, the values are not kept. I've tried so many solutions now that I feel lost in space :)
I've removed some code for simplicity. This snippet is only for the pages.
Thanks for your help. Cheers!