I am trying to set default value for Selected/not selected property to true in Episerver>Admin>My page type>Edit property. This should create a checkbox which is checked when creating new pages using My page type. However, after creating a new page, the checkbox is still not checked.
The same issue is with current, not new pages which use My page template.
I have tried setting Selected/not selected property in the code behind and this worked, however, i would like to use built in functionality so i could have more control.
I would appreciate some advise/help. Is it Episerver bug or something i am missing?
Since you are trying to set the default value in Admin mode, I'm guessing your project doesn't use Page Type Builder to define page types in code? (When using Page Type Builder, the values set in code will override manual changes you make in Admin mode every time the site is restarted).
Setting a "selected/not selected" property to "true" (no quote marks necessary) should work (I just tried it on a fresh CMS 6 R2 Alloy). But note this will only take effect for NEW pages using that page type - it will not affect existing pages.
Are you sure you clicked the radio button next to the textfield where you can write the default value? (not the "No default value" or "Inherit" radio buttons)
No, we dont use Page Type Builder but this pointed me to a correct direction, thanks. I tried creating a new page using Episerver menu and the checkbox was checked. However, we do create some pages programatically using CreateWritableClone, and its based on another default page, which did not have the checkbox checked. All i had to do is check it and everything worked.