Copied to clipboard

Flag this post as spam?

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


  • Urvish 252 posts 776 karma points
    Apr 05, 2016 @ 10:07
    Urvish
    0

    How to get list of All the document types

    Hi,

    How can I get the list of all the document types created in Umbraco?

    After some googling I didn't find any API regarding the list of document types.

    Can anyone help to get the list of Doc types?

    Thanks in advance.

    Regards,

    Urvish Mandaliya

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Apr 05, 2016 @ 10:32
    Alex Skrypnyk
    102

    Hi Urvish,

    Did you mean ContentType?

    Try to look: https://our.umbraco.org/documentation/Reference/Management/Services/ContentTypeService

    You can use GetAllContentTypeAliases, you will have all content type aliases, and then if you need you can get contenTypes by alias.

    Thanks, Alex

  • Urvish 252 posts 776 karma points
    Apr 05, 2016 @ 11:48
    Urvish
    0

    Thanks Alex for the reply.

    I mean "Document Type". Please see the below image. I need the list of all the Document types.

    enter image description here

    From the above ContentTypeService I didn't get the list of the Document Types.

    Regards,

    Urvish Mandaliya

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Apr 05, 2016 @ 12:50
    Alex Skrypnyk
    1

    Urvish, you get list of aliases and get each content type by alias.

    DocumentType = ContentType

    Thanks, Alex

  • Urvish 252 posts 776 karma points
    Apr 05, 2016 @ 13:25
    Urvish
    0

    Thanks Alex.

    Got the list.

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Apr 05, 2016 @ 14:18
    Alex Skrypnyk
    0

    Urvish, you are welcome.

  • 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