Copied to clipboard

Flag this post as spam?

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


  • Osman Coskun 164 posts 398 karma points
    Nov 10, 2015 @ 16:32
    Osman Coskun
    0

    How to render document type from NC with multiple doc types

    Hello,

    I've started using nested content for a while. Thanks for this great extension.

    I configured two document types in nested content for a project, and i need to read doc type alias from nc. I can get all the properties but couldn't manage to read ncContentTypeAlias.

    I tried @Umbraco.Field(item, "ncContentTypeAlias") . It returns nothing.

    What should be the correct syntax to get the doc type alias?

    Ps. I work on Umbraco 7.2.8

    Thanks in advance...

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Nov 10, 2015 @ 16:44
    Lee Kelleher
    100

    Hi Osman,

    The DocType alias isn't available as a property-value on the node, but you can try accessing it on the object itself:

    @item.DocumentTypeAlias
    

    Cheers,
    - Lee

  • Osman Coskun 164 posts 398 karma points
    Nov 10, 2015 @ 17:36
    Osman Coskun
    0

    Yep it worked.

    Thanks for the fast reply.

    Cheers :)

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Nov 10, 2015 @ 17:38
    Lee Kelleher
    0

    No worries! Good to hear you're enjoying Nested Content! :-)

    Cheers,
    - Lee

  • Osman Coskun 164 posts 398 karma points
    Nov 10, 2015 @ 17:42
    Osman Coskun
    1

    It's pretty usefull for listing pages like press reviews, links. Good job...

Please Sign in or register to post replies

Write your reply to:

Draft