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 4908 posts 12265 karma points MVP 4x 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

Please Sign in or register to post replies

Write your reply to:

Draft