Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a very simple code to retrieve doc type by alias in umbraco 6.1.6
I am using below code
var dt =DocumentType.GetByAlias("TestDocType");or var dt = new DocumentType(1118);
var dt =DocumentType.GetByAlias("TestDocType");or var dt = new
DocumentType(1118);
Both of above lines return null. however CMSNode returns the node details
var dt = new CMSNode(1118); // returns node's details
var dt = new
CMSNode(1118); // returns node's details
Please let me know what I am missing here.
Regards
Ben
Hello,
Is 1118 the id of the node or the id of the documenttype? Could you post a screenshot where you have the documenttype opened?
Jeroen
Have you got the right alias? What information by the doc type.
I would use names alias rather than ids :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
DocumentType.GetByAlias returns null
I have a very simple code to retrieve doc type by alias in umbraco 6.1.6
I am using below code
Both of above lines return null. however CMSNode returns the node details
Please let me know what I am missing here.
Regards
Ben
Hello,
Is 1118 the id of the node or the id of the documenttype? Could you post a screenshot where you have the documenttype opened?
Jeroen
Have you got the right alias? What information by the doc type.
I would use names alias rather than ids :)
is working on a reply...