November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Surely if fields that inherited their value were prepopulated in the UI then not only would it solve this problem but it would also be much less confusing for the user.
So in other words, if the checkbox was selected in a parent page, then it would also be selected when you view that property in a child page. Then if you chose to deselect it the CMS could clearly see that the value needed to be reset on that page.
As stated, dynamic properties are always inherited unless they are set at the current page. This is shown in the UI next to the property (*=set at the current page, ^=inherited, ?=undefined). Hovering the indication will provide you with a tool tip saying where it's inherited from.
If you need to check if the dynamic property is set or not set at the current page, you can access it programaticly and first use .IsDynamicProperty (if you need to verify) and then use:
PropertyBoolean pb = CurrentPage.Property["bool"] as PropertyBoolean;
if (pb.IsDynamicProperty)
{
DynamicProperty dp = DynamicProperty.Load(CurrentPageLink, "bool");
dp.InheritedPageLink //source page
}
InheritedPageLink can be used to check if the value is set at the current page or not.
I'm aware of that. But is there a good reason why this over complicated unintuiitive system is used?
I can't say why things are the way they are, but I guess you could workaround the current design by building a custom property instead of the built-in bool (selected/not select). The bool in EPiServer does only store it's value if it is set (true). I guess it's built the way it is to limit entries in the database.
You could however build a custom property that inherits from PropertyString and use a checkbox for rendering. That would allow you to store as many values you'd wish (e.g: true, false, not selected) and render it like a checkbox used when setting access rights in Windows (can be selected, not selected or show up as grey when inherited).
I think that this is pretty strange too, that EpiServer doesnt support any easy-to-do solution for this. If you have 999 out of a 1000 childpages that you want to inherit a property, you shouldn't use a dynamic property for this? That just screams wrong to me :)
/Mats
An even better solution is to have 5 values.
Guess the option values text could be better