for example just want to return media items with a specific filename ie iwtspecieslist.xlsx
Currently migrating multisite from Wordpress to Umbraco and dealing with mapping all the wordpress media urls to umbraco media urls basically writting a script to save loads of time automating as CMSImport tool does import the pages and HTML but not import the media and convert the urls in the html unless extend the package, write a script or manually convert hundreds of document urls :(
Anyone know how to filter the GetPagedDescendants function cant see anything in the user guide except that is says there is a filter?
Got Examine Index working fine in Umbraco 10 so thanks for pointing us in that direction - does what I needed to do 8)
However the ipublishedcontent query did not run in razor view, did not like some of the import references probably would need adjusting.
Still partly curious about the provided filter parameter on the MediaService.GetPagedDescendents function seems weird its there but can't find any examples of how to actually use it, the other parameters work ok surely there is a way?
Still partly curious about the provided filter parameter on the
MediaService.GetPagedDescendents function seems weird its there but
can't find any examples of how to actually use it, the other
parameters work ok surely there is a way?
I don't think it would work for your use case as IIRC it only works on strongly typed properties of IContent, something like below
MediaService.GetPagedDescendants Filtering
Hi U Community,
My question is how to create a IQuery
IQuery
IEnumerable
for example just want to return media items with a specific filename ie iwtspecieslist.xlsx
Currently migrating multisite from Wordpress to Umbraco and dealing with mapping all the wordpress media urls to umbraco media urls basically writting a script to save loads of time automating as CMSImport tool does import the pages and HTML but not import the media and convert the urls in the html unless extend the package, write a script or manually convert hundreds of document urls :(
Anyone know how to filter the GetPagedDescendants function cant see anything in the user guide except that is says there is a filter?
Thanks,
Paul
This may help
https://shazwazza.com/post/searching-with-ipublishedcontentquery-in-umbraco/
Hi Huw,
Thanks for the link its useful info but think that is for Umbraco 7/8? Looking specifically for Umbraco 10 help.
Cheers,
Paul
I think it should still work basically the same in Umbraco 10
You could also try an examine search https://www.jondjones.com/learn-umbraco-cms/umbraco-9-tutorials/getting-started-with-umbraco-9/how-to-build-a-search-page-in-umbraco-v9/
Hi Huw,
Got Examine Index working fine in Umbraco 10 so thanks for pointing us in that direction - does what I needed to do 8)
However the ipublishedcontent query did not run in razor view, did not like some of the import references probably would need adjusting.
Still partly curious about the provided filter parameter on the MediaService.GetPagedDescendents function seems weird its there but can't find any examples of how to actually use it, the other parameters work ok surely there is a way?
https://apidocs.umbraco.com/v10/csharp/api/Umbraco.Cms.Core.Services.IMediaService.html#UmbracoCmsCoreServicesIMediaServiceGetPagedDescendantsSystemInt32SystemInt64SystemInt32SystemInt64UmbracoCmsCorePersistenceQueryingIQueryUmbracoCmsCoreModelsIMediaUmbracoCmsCoreServicesOrdering
But all good for now so will move on unless anyone likes solving these things.
Thanks again,
Paul
Hi Paul,
I don't think it would work for your use case as IIRC it only works on strongly typed properties of IContent, something like below
is working on a reply...