Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Required Page Type Property from Inherited Page Data


Does anyone know how best to override on a Page Data Property.


I want to add a [Required] around a Category page property to enforce it is set when adding a page.


“Article Page” Inherits “Standard Page” which inherits “Site Page Data” which Inherits “Page Data”


I want to set Category to “Required” within “Article Page”.

public virtual CategoryList Category


When I use this within Article Page


public override CategoryList Category { get; set; }


It enforces the required when creating a new page but show two Category options in Form editing.



Mar 06, 2013 18:29


public virtual CategoryList Category {get; set;} seems to do the trick.

Mar 06, 2013 21:57

The virtual creates it as anouther property the override allows it to edit the "Page Data" property but two show in form edit mode either way I try. I need it to override and then only display once in form edit?

Mar 07, 2013 15:07

I thought I only got one property maybe I did miss the second one.

Mar 07, 2013 15:45

This seems to be working and making only one visable in edit mode and force's required when saving, it does not show required before adding a page so works as I need it.

public override CategoryList Category { get; set; }

Mar 07, 2013 18:33
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.