Copied to clipboard

Flag this post as spam?

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

  • Alex 3 posts 83 karma points
    5 days ago

    Get a specific contentType on Umbraco 8

    In Umbraco 7 I wrote like this

    IContentType dt = contentTypeService.GetContentType("nameCont");

    Now in Umbraco 8 which is the fastest method to get a specific contentType?

    Can anyone help me?

  • Thomas Hansen 124 posts 339 karma points
    32 minutes ago
    Thomas Hansen


    Can you use:

    IEnumerable<IPublishedContent> t = Umbraco.Content(1234).Descendants().Where(x => x.ContentType.Alias == "nameCont");
Please Sign in or register to post replies

Write your reply to: