List<String> groupsOfPerson = new List<String>();
var groups = Umbraco.TypedContentAtRoot().First().Descendants("Group");
foreach(var group in groups)
{
foreach(var memberId in group.GetPropertyValue("Members").ToString().Split(','))
{
if(memberId == CurrentPage.Id.ToString())
{
groupsOfPerson.Add(group.Name);
}
}
}
Multinode Tree Picker - is this node picked anywhere?
Hi together
Is there an easy way i can find out if a node is picked in any multinode tree picker?
-
My case:
I have two Document Types: Group and Person. Group has a property "Members" where you can choose some Persons with a multinode tree picker.
Now when i display a Person i want to list all Groups this Person is a Member from.
Is there an easy way to do this or do i have to loop trough every Group and compare the IDs?
Greets, Silvan
OK, now i did this solution:
But I'm not very satisfied ...
Has anyone a better solution for this?
Greets, Silvan
is working on a reply...