Copied to clipboard

Flag this post as spam?

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


  • Alex Skrypnyk 6175 posts 24176 karma points MVP 8x admin c-trib
    Oct 01, 2013 @ 14:46
    Alex Skrypnyk
    0

    How to get all nodes which starts from one letter?

    Hi,

    How to get all nodes which starts from one letter?

    Thanks,

    Alex

     

     

  • Damian Green 452 posts 1433 karma points
    Oct 01, 2013 @ 16:58
    Damian Green
    0

    You could get the root node and then all its descendants into a collection and then use linq to return all nodes that start with the letter.

  • Damian Green 452 posts 1433 karma points
    Oct 01, 2013 @ 17:07
    Damian Green
    0

    something like

    var nodes = Model.Content.AncestorOrSelf(1).Descendants().Where(x => x.Name.StartsWith("l"));

Please Sign in or register to post replies

Write your reply to:

Draft