Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    Jun 15, 2012 @ 13:58
    Anton
    0

    uComponents.Core.uQuery.GetCurrentNode().Children.Take(10);

    'umbraco.presentation.nodeFactory.Nodes' does not contain a definition for 'Take' and no extension method 'Take' accepting a first argument of type 'umbraco.presentation.nodeFactory.Nodes' could be found (are you missing a using directive or an assembly reference?)

    uComponents.Core.uQuery.GetCurrentNode().Children.Take(10);
    How I can get do this?

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Jun 15, 2012 @ 21:43
    Hendy Racher
    1

    Hi Anton, I've not tested this but does the following help ?

    uQuery.GetCurrentNode().GetChildNodes().Take(10);

    (GetChildNodea is an extension method in uComponents.Core.uQueryExtensions that returns an IEnumeranle of Node objects, so should work with the Take method)

  • Anton 135 posts 186 karma points
    Jun 15, 2012 @ 22:58
    Anton
    0

     uComponents.Core.uQueryExtensions.NodeExtensions.GetChildNodes(Node.GetCurrent()).Take(10)

    Thanks, it is working)

Please Sign in or register to post replies

Write your reply to:

Draft