Hello,
you can loop through all the related pages like this in your transformation:
{%
foreach (doc IN Documents[NodeAliasPath].RelatedDocuments.All) {
Documents[doc.NodeAliasPath].GetValue("Country");
}
|(identity)GlobalAdministrator%}
However, I would recommend to change the way it's designed and instead of related pages I would take advantage of the content tree and make the hierarchy like:
- Country
-- City
--- Office
With this approach you have all the information available directly.
Best regards,
Jan Hermann