Non-virtual property


It have come to my attention that it is possible to declare a property type in the page type without the virtual attribute. My aim is to declare a list of another page type as a property in my page type. I have also heard that this predicament should be placed in the view model.

All contributions are much appreciated =)

Jan 20, 2014 10:59

There is a built-in property type "Page Type" - is this what you are looking for?

Jan 20, 2014 11:42

In this case I have a page type namned StandardPageType. I want to use that page as an property type in another page type like this:

public List<StandardPageType> PageList { get; set; }

Jan 20, 2014 13:45

You want to point to a page instance of type StandardPageType? If so, this will help you:

Limiting a Page Property to a specific Page Type in EPiServer 7

Jan 20, 2014 13:48

No. Maybe I was using the Episerver terminology correctly. I want to declare a property in a pagetype in the code. The property shall not be reachable from the Epi GUI. The idea was to mix properties specified as episerver properties with properties of a normal C# class. Is that possible?

Jan 20, 2014 13:55

Use the Ignore attribute to tell EPiServer to ignore it.


public List<StandardPageType> PageList { get; set; }


Jan 20, 2014 14:02

Awsome! Thanks Per.

Jan 20, 2014 14:04
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.