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:
I am using Umbraco 13.
is working on a reply...