Hi,
I am trying to find a way to find unused documents inside a folder, I tried IRelateionService but it doesn't work for me, it seems it can't find the correct relation or maybe I completely misused it. here is the code I used:
var items = _contentService.GetPagedChildren(folderId, 0, int.MaxValue, out _);
List<int> list = new();
foreach (var item in items)
{
var relations = _rationService.GetAllRelations(item.Id);
if (!relations.Any())
{
list.Add(item.Id);
}
}
relation have some IDs: an ID, child ID and parent ID, but none of the things I want, the parent is node parent and the child is node id itself. I couldn't find a way to get related documents.
ps: by related documents I mean here:
Find un-referenced items
Hi, I am trying to find a way to find unused documents inside a folder, I tried IRelateionService but it doesn't work for me, it seems it can't find the correct relation or maybe I completely misused it. here is the code I used:
relation have some IDs: an ID, child ID and parent ID, but none of the things I want, the parent is node parent and the child is node id itself. I couldn't find a way to get related documents. ps: by related documents I mean here:![enter image description here](/media/upload/069c7268-166a-4201-aaad-c3e130967ded/Screenshot%202024-07-26%20140111.png)
I am using Umbraco 13.
is working on a reply...