Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How do I return the document type of the current node? View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
emarchioni-ecentricarts - 5/13/2011 9:31:16 AM
   
How do I return the document type of the current node?
I have several custom document types and I need to retrieve the Document Type value of the current node.

I've tried using the following, but both return nothing.

CMSContext.CurrentDocument.NodeDocType
CMSContext.CurrentDocument.GetValue("DocumentType")

How do I return the document type of the current node?



User avatar
Member
Member
joeh42 - 5/13/2011 3:34:36 PM
   
RE:How do I return the document type of the current node?
I believe you are looking for CMSContext.CurrentDocument.NodeClassName, which will return your custom document type (i.e. custom.Event).

CMSContext.CurrentDocument.NodeDocType will return something like cms.page, and not the custom document type you are looking for