Copied to clipboard

Flag this post as spam?

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


  • Sonja 132 posts 620 karma points
    Sep 26, 2018 @ 10:13
    Sonja
    0

    Content' is inaccessible due to its protection level

    Hi, I have

     Items= Umbraco.Content(Model.Content.Id).Children.OrderByDescending(x => x.Name).ToList()
    

    and I'm getting : 'Umbraco.Core.Models.PublishedContent.PublishedContentWrapped.Content' is inaccessible due to its protection level

    how do I get this list view data?

  • Sonja 132 posts 620 karma points
    Oct 01, 2018 @ 09:50
    Sonja
    0

    found the solution:

    @inherits UmbracoTemplatePage
    
    @using Umbraco.Web
    @using Umbraco.Web.Mvc
    
    @using ContentModels = Umbraco.Web.PublishedContentModels;
    
  • 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