Hello.
You can use following code and compose cycle (while () {} ) to get requested design.
1. Get current node´s parentID:
CMS.CMSHelper.CMSContext.CurrentDocument.NodeParentID;
2. Get parent according to its NodeParentID via:
CMS.WorkflowEngine.DocumentHelper.GetDocument(Int32, TreeProvider)
You need TreeProvider as it is described here:
http://devnet.kentico.com/docs/devguide/selecting_nodes.htm3. Repeat selection above until current node´s
NodeLevel property is requested value.
Best Regards,
Radek Macalik