November Happy Hour will be moved to Thursday December 5th.

Non-virtual property

Vote:
 

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 =)

#80275
Jan 20, 2014 10:59
Vote:
 

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

#80284
Jan 20, 2014 11:42
Vote:
 

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; }

#80294
Jan 20, 2014 13:45
Vote:
 

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

#80295
Jan 20, 2014 13:48
Vote:
 

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?

#80296
Jan 20, 2014 13:55
Vote:
 

Use the Ignore attribute to tell EPiServer to ignore it.

 

[Ignore]
public List<StandardPageType> PageList { get; set; }

    

#80297
Jan 20, 2014 14:02
Vote:
 

Awsome! Thanks Per.

#80298
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.