Copied to clipboard

Flag this post as spam?

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

  • JamesW 18 posts 128 karma points
    Sep 30, 2019 @ 11:17

    Filter by custom property in partail view


    In Umbraco 7 I would have just used: var home = CurrentPage.Site(); var filtered = home.Children.Where("PropertyName == @0", false)

    Any idea how I transfer this to Umbraco 8?

    So far I now use: @inherits Umbraco.Web.Mvc.UmbracoViewPage And get the home page with: var home = Model.Root();

    But I can't find how to filter by a property name.

  • Shaishav Karnani from 346 posts 1623 karma points
    Sep 30, 2019 @ 11:26
    Shaishav Karnani from

    You can do following to get above results:-

    var home = Model.Root();
    home.Children().Where(x=>x.Value("PropertyAlias") == false);

    This is good link that shows new Properties Reference for Umbraco 8.



  • JamesW 18 posts 128 karma points
    Sep 30, 2019 @ 11:36

    Thank you and thanks for the link, I was looking in the wrong place in the documentation so couldn't find it!

Please Sign in or register to post replies

Write your reply to: