Copied to clipboard

Flag this post as spam?

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


  • John 18 posts 74 karma points c-trib
    Jul 17, 2015 @ 06:59
    John
    0

    Which is the best way to find content by Id?

    Which is better?

       protected override IPublishedContent FindContent(RequestContext requestContext, UmbracoContext umbracoContext)
            {
                var helper = new UmbracoHelper(umbracoContext);
                returnhelper.TypedContent(_pageId);
            }
    

    Or

       protected override IPublishedContent FindContent(RequestContext requestContext, UmbracoContext umbracoContext)
            {
                return umbracoContext.ContentCache.GetById(_pageId); 
            }
    

    or another way?

  • 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