Copied to clipboard

Flag this post as spam?

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


  • Sa 118 posts 152 karma points
    Sep 18, 2009 @ 07:29
    Sa
    0

    Regarding id

    hi folks.,

    Is it possible to get contentType or DocumentType id dynamicaly?

  • Ove Andersen 435 posts 1541 karma points c-trib
    Sep 18, 2009 @ 09:01
    Ove Andersen
    0

    Yes. In XSLT you get it by getting the @nodeTypeAlias property on a node.

    You can do the same in a template by using Inline XSLT. A primer can be found here.

  • Sa 118 posts 152 karma points
    Sep 18, 2009 @ 09:20
    Sa
    0

    thanks for your reply.

    I am using C# class.. i need to get it there

  • Richard Soeteman 4045 posts 12893 karma points MVP 2x
    Sep 18, 2009 @ 09:31
    Richard Soeteman
    0

    Hi Sam,

    I assume that you are using a UserControl. The following statement will return the alias of the ContentType

    umbraco.presentation.nodeFactory.

    Node.GetCurrent().NodeTypeAlias

     

    Hope this helps you,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft