Due to vitually no real documentation and (afaik) no examples, here's what I've worked out after about 4 hours of internet digging and trial and error:
long n = 3;
var descendents = ApplicationContext.Current.Services.ContentService.GetPagedDescendants(node.Id, 1, 3, out n, "UpdateDate", Umbraco.Core.Persistence.DatabaseModelDefinitions.Direction.Descending, "FILTER HERE");
The above is a conversion from a view I had with the following:
foreach (var child in region.Descendants("location").Where("Visible && popularDestination").OrderBy("UpdateDate desc").Take(3))
With no filter it returns three items, but I really would like to select only nodes of type 'location', but cannot work out the filter parameter.
If someone from UmbracoHQ (or otherwise) could shed some light or provide a few examples here that would be great.
How to use "filter" argument in ContentService.GetPagedChildren?be
Hi,
I would like to know how to use the "filter" argument in
because from what i do understand is that I can use it to filter the descendants on properties, is this correct?
And if so, can anybody explain on how to use it?
Tnx in advance!
-
Garret
Hi Garret,
Did you find a solution for this? I also want to filter on the ContentService!
Kind regards, Rik
Hi,
Due to vitually no real documentation and (afaik) no examples, here's what I've worked out after about 4 hours of internet digging and trial and error:
The above is a conversion from a view I had with the following:
With no filter it returns three items, but I really would like to select only nodes of type 'location', but cannot work out the filter parameter.
If someone from UmbracoHQ (or otherwise) could shed some light or provide a few examples here that would be great.
Thanks all.
Hi community,
I'd really appreciate some help on this. Still stuck on the filter parameter of GetPagedDescendants().
Is this a filter as used in a typical Where(x == something) statement?
I'm purely guessing now but not getting anywhere.
Many thanks
same here!
is working on a reply...