A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
Hello,
I have a page type called Interior Page. I added a new property for this page type, which is a checkbox.
I am able to set a default value for this property using SetDefaultValues:
public override void SetDefaultValues(ContentType contentType)
{
newproperty = true;
}
However, the default value only works for newly created instances of Interior Page type.
I have 100s of already existing Interior Pages that need to have this new property set to the default value of true. How can I achieve this?
I tried defining the new property like below, but that didn't seem to do the trick:
public virtual bool NewProperty {
get => this.GetPropertyValue(page => page.newProperty);
set { this.SetPropertyValue(page => page.newProperty, true); }
}
Any suggestions on how I could set the default value for the new property on all existing pages of Interior Page type?
Thanks!