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 861 posts 3844 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)

  • 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