November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I would suggest that you take another approach on your class inheritance..
And if you need to have fallback data on values it's mostly a better approach to let the rendering do this instead of adding this to the model/pagetype.
Valdis Iljuconoks
ScaffoldColumn(false) doesn't stop EPiServer serialize the property I think
Hi, and thanks all
Sorry for not answering earlier, been busy busy busy doing nothing at all... ;-)
First I solved it like this (as Per also have suggested)
public abstract class SitePageData : PageData
{
public virtual string Heading
{
get
{
string heading = this.GetPropertyValue(content => content.Heading);
return !string.IsNullOrEmpty(heading) ? heading : this.Name;
}
}
}
public class InformationPage : SitePageData
{
[CultureSpecific]
[Display(GroupName = SystemTabNames.Content, Order = 10)]
public new virtual string Heading
{
get { return base.NavigationItemName; }
set { this.SetPropertyValue(content => content.NavigationItemName, value); }
}
}
But I want to avoid overriding with "new". So I will try "ScaffoldColumn", didnt know about that attribute. I will also consideer what Alf says, I agree you have a point there.
Regards Hans
In EPiServer 7.0 I can do: