Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
A ContentType is a definition that corresponds to a content. ContentType.ModelType gives you your .Net type.
I am not sure if this is what you need:
var contentRepo = ServiceLocator.Current.GetInstance<IContentRepository>();
var content = contentRepo.Get<IContent>(new ContentReference(9));
var contentType = content.GetOriginalType();
where 9 is the page ID.
Hi folks,
I'm considering is there any equivalent function of PageTypeResolver.Instance.GetPageTypeType on EPiServer 7? I use ContentTypeRepository.Load() but it always return ContentType type not typeof(PageData) as result of PageTypeResolver.Instance.GetPageTypeType function.
Any help would be appriciated!