Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carlos 338 posts 472 karma points
    Jan 17, 2012 @ 23:52
    Carlos
    0

    NodeFactory Document Type Id

    How can I get my DocType ID of my current node using Node Factory?

     

    THanks for the help.

  • Tom Fulton 2030 posts 4996 karma points c-trib
    Jan 18, 2012 @ 01:43
    Tom Fulton
    0

    Hi Carlos,

    Here is one way you could do it:

    using umbraco.NodeFactory;
    using umbraco.cms.businesslogic.web;
            var currentNode = Node.GetCurrent();
            DocumentType dt = DocumentType.GetByAlias(currentNode.NodeTypeAlias);
            //Doctype id is:  dt.Id

    HTH,
    Tom

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies