Copied to clipboard

Flag this post as spam?

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


  • Michael 22 posts 61 karma points
    Apr 16, 2015 @ 13:28
    Michael
    0

    How to fetch multiple node quickly?

    The construction of my tree node is like the following picture you see. My purpose is to fetch the all items that belong to Sports and Books. 

    Now I use the following method to get all items what I want. but it is a little slow. I hope there is a good way to meet my requirement. 

    nodeArray = umbraco.uQuery.GetNode(1059).GetDescendantNodes().Where(n => { { return n.Parent.Id==1074||n.Parent.Id==1133; } }).OrderByDescending(p => p.CreateDate).Take(10);

    Do you have good ideas or suggestions? Could you helpe me?

    Thank you very much!!!

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Apr 16, 2015 @ 13:40
    Jeroen Breuer
    0

    Hello,

    uQuery is the old api. Try IPublishedContent: https://our.umbraco.org/documentation/Reference/Mvc/querying

    Jeroen

  • 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