Copied to clipboard

Flag this post as spam?

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


  • Martin 81 posts 246 karma points
    May 25, 2015 @ 22:48
    Martin
    0

    Getting IPublishedContent by Document Type

    Hi guys, currently I get a node by it's document type in the following way:

    public IPublishedContent GetPage(string documentType)
    {
        var page = umbracoHelper.TypedContentSingleAtXPath("//" + documentType);
    
        if (page != null)
        {
            return page;
        }
    
        return null;
    }
    

    I was wondering if there was a more modern way of doing this?

  • Benas Brazdziunas 34 posts 155 karma points c-trib
    Jun 11, 2015 @ 22:11
    Benas Brazdziunas
    100

    Hi

    Some help you will find here:

Please Sign in or register to post replies

Write your reply to:

Draft