Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Have you read this article? http://world.episerver.com/Blogs/Lee-Crowe/Dates/2012/4/PageTypeBuilder-and-EPiServer-CMS-6-R2-Synching-Issues--Important/
it should clear up the default value issue.
I think you are missing DefaultValueType=EPiServer.DataAbstraction.DefaultValueType.Value
DefaultValueType is an enum with the following values Inhertit, None and Value.
[PageTypeProperty(Type = typeof(PropertyBoolean),
Searchable = false,
UniqueValuePerLanguage = true,
SortOrder = 1500,
DefaultValue = true,
DefaultValueType=EPiServer.DataAbstraction.DefaultValueType.Value)]
public virtual bool ShowInSiteMap { get; set; }
Hello everybody,
I have a CMS 6 project and working on, and I'm using PTB 2.0.
My problem is that I have a boolean property which I want to set a default value of "true" for all the pages. IT will render as a checkbox. But for some reason, this is not working, the checkbox is added but it's unmarked. My property declaration looks like this:
[PageTypeProperty(Type = typeof(PropertyBoolean), Searchable = false, UniqueValuePerLanguage = true, SortOrder = 1500, DefaultValue = true)]
public virtual bool ShowInSiteMap { get; set; }
What am I doing wrong?
/Kenia