Access the ancestors of an item
Version:
You can use the Sitecore.Data.Items.Item.Parent property in a recursive method to access the ancestors of an item. For example, to access the ancestors of the /Sitecore/Content/Home item in the Master database:
Warning
If the recursive method passes its argument to itself, then that method enters an infinite loop.