While reading the source to figure out how to do hierarchical URLs in Orchard, I came across this in SlugTokens.cs:
// /path/to/parent-item/
.Token("ParentPath", T("Parent Path"), T("The parent item's path and slug with an appended forward slash if non-empty"));
Where is this used? Do content types have a parent property that I can leverage for making hierarchies?
Yes, if your content type has the Common part (and most should have it), there is a Container property. It’s also available from tokens:
{Content.Container.Path}/{Content.Slug}is the autoroute pattern for blog posts for example. I think it’s equivalent to{Content.ParentPath}/{Content.Slug}.