Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
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.
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.
https://our.umbraco.com/documentation/reference/querying/ipublishedcontent/Properties/
Cheers,
Shaishav
Thank you and thanks for the link, I was looking in the wrong place in the documentation so couldn't find it!
is working on a reply...
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.
Continue discussion
Filter by custom property in partail view
Hi
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.
You can do following to get above results:-
This is good link that shows new Properties Reference for Umbraco 8.
https://our.umbraco.com/documentation/reference/querying/ipublishedcontent/Properties/
Cheers,
Shaishav
Thank you and thanks for the link, I was looking in the wrong place in the documentation so couldn't find it!
is working on a reply...
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.