Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

PageData.Property is read-only?

I used to be able to do : CurrentPage.Property.Add(property) / .Add(propname, property) But since the Property object seem to be read-only, how can I add a property to the PropertyDataCollection of a page? Also it seem strange that the PropertyDataCollection still has Add when its read-only or am I missing something really simple here?
May 09, 2007 19:33
Hello, The cache handling has been optimized to pass references to the same object (previous implementation created a clone for each fetch), therefore it needs to be read-only. To get a writable copy, simply do this: PageData x = GetPage(pageLink); PageData y = x.CreateWritableClone(); now you can modify y. There is additional information on this topic that has not yet been published, but it should be online this afternoon. Look under RC1 release notes / breaking changes. Best regards, Magnus Stråle
May 10, 2007 13:48
Ah, thank you. :-) That'll do the trick.
May 11, 2007 14:58
Shouldn't this be in the exception message? No small change to how EPiServer works in my opinion.
Apr 07, 2008 21:31
It's a big change that had to be done, I have seen performance boosts ranging from 30% to 7000% depending on the number of pages you read per page request.
Apr 07, 2008 22:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.