London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Get all Properties for a specified Page Type

Vote:
 

Hi,

I want to list out all the properties associated with a Page Type. How do I do this?

I'm not seeing any clues from the PageType class, so it would be good if someone could point me in the right direction.

Thanks,

James

#39852
Jun 03, 2010 15:00
Vote:
 

You can access these through the PageType class. Rather confusingly Properties are called Definitions in this case. Try something like this.....

var pageType = PageType.Load(this.PageTypeData.ID);
foreach (var property in pt.Definitions)

{

//do something

}

#39855
Edited, Jun 03, 2010 15:46
Vote:
 

That's it! I saw that in the SDK but ignored it - 'Definitions' completely threw me.

Thanks a lot.

#39857
Jun 03, 2010 16:43
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.