Copied to clipboard

Flag this post as spam?

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


  • Aximili 177 posts 278 karma points
    Oct 26, 2011 @ 02:06
    Aximili
    0

    Select where NodeTypeAlias ends with "Page"

    How do you select nodes where the NodeTypeAlias ends with Page?

     

  • Aximili 177 posts 278 karma points
    Oct 26, 2011 @ 02:58
    Aximili
    0

    I'm looking for something like this

    var items = node.Children.Where("Visible").Where(NodeTypeAlias.EndsWith("Page"))
  • Rodion Novoselov 694 posts 859 karma points
    Oct 27, 2011 @ 18:35
    Rodion Novoselov
    1

    Hi.

    var items = node.Children.Where("Visible && NodeTypeAlias.EndsWith(\"Page\")");

    or you can use parameterised syntax when it's more suitable:

    var items = Model.Children.Where("Visible && NodeTypeAlias.EndsWith(@0)", "Page");
Please Sign in or register to post replies

Write your reply to:

Draft