Try our conversational search powered by Generative AI!

page type

Vote:
 

I know theres a quick way to do this but it escapes me now.

Whats the syntax for retrieving page type based on page id? Thanks! Episerver 6 btw

#150588
Jun 23, 2016 8:34
Vote:
 

To get the page type name you can use the PageTypeName property:

var pageRef = new PageReference(pageId);
var page = DataFactory.Instance.GetPage(pageRef);
var pageTypeName = page.PageTypeName;
#150590
Edited, Jun 23, 2016 8:53
* 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.