kentico_helenag
-
2/9/2009 7:29:22 AM
RE:Need to Get MasterPage set for a site in ASP.Net code
Hi,
You could select the root document – its Alias path is ‘/‘. Please see here: http://devnet.kentico.com/docs/devguide/selecting_nodes.htm
Then you could know the page template ID:
node. DocumentPageTemplateID
then you could use:
CMS.PortalEngine.PageTemplateInfoProvider.GetPageTemplateInfo(pageTemplateId) to get the object of PageTemplateInfo class.
CMS.PortalEngine.PageTemplateInfo.CodeName (resp. DisplayName) returns the name of template.
Best regards, Helena Grulichova
|