Just thought I'd share an idea that has popped into my head a few times by now, while working with PW.
The purity of the central tree data-structure that powers the ProcessWire data-model, is very elegant, and for the most part works really well for me.
One instance where it does not always work well, is in terms of optimizing URLs. Most of the time, simply having items grouped under other items works quite well, but at other times, you can end up with URLs that are littered with keywords that aren't really relevant. Not great for SEO, and not always great for URLs you intend to share via various channels. (Twitter, printed material, etc.)
This happens with deeply nested menu structures in particular. On one site, I ended up with a URL like this: "/articles/some-topic/some-page/" - the keyword "articles" has no particular relevance here, it's just a logical grouping, not something you expect people to search for. And "some-topic", in this particular case, was unwanted. The client was asking for a short, user-friendly URL, e.g. "/some-page", and in order to do that, he would have to place the actual page in the root of the site, which was not appropriate in this case.
So this brings me back to an idea I've been kicking around (for my own CMS) for some years - the idea of having more than one hierarchy. Actually, an arbitrary number of user-defined hierarchies - with the ability for the user to place a given page in either one or more of these hierarchies.
I've had various versions of this idea over the years, but in the simplest version, one of these hierarchies is the designated URL hierarchy - so this would be the hierarchy ProcessWire has now.
Other hierarchies are just logical (taxonomic) hierarchies that could be used for whatever purposes you like. So as an example, "product categories" might be a dedicated arbitrary hierarchy, in which "product" pages can be organized logically, independently of the hierarchy that drives the URLs. If somebody is selling iPads, for example, you can place the product in the "product categories" hierarchy, e.g. "tablets/apple/ipad/32gb", which might determine where the product appears on a menu, but does not affect it's URL. This particular product might be placed in the URL hierarchy as simply "/apple-ipad-32gb", for example.
(maybe not the best example, as in this particular case, it might make sense to include all the keywords from the category - it's just an example.)
This problem could also be addressed, apparently, by allowing a page to be referenced more than once in the tree, or by introducing an "alias" template, so that you can "optimize" URLs by creating "aliases" for pages in the tree. Mathematically, this solution doesn't speak to me - in a real tree, a node should have precisely one parent, otherwise you introduce the potential for things like circular references or circular queries, e.g. traversals like A->B->C->A->B->C->... Or, in the case of aliases (as opposed to references), you introduce "dead" nodes from which you cannot traverse or find subpages, because the "alias" node is a leaf-node, even if the page it references has children. (otherwise, mathematically, it would be a reference and not an alias.)
Another possible solution would be to simply allow a custom URL alias for any page. This would probably be relatively simpler to implement, perhaps as simple as adding a "URL alias" text-field to templates that need it, adding a very simple module that does a query for the exact value of that text-field prior to PW doing it's normal traversal and dispatch. (This might not be great for SEO though, as you end up with two URLs for the same page.)
Clearly that's a much simpler solution than introducing multiple hierarchies, but for other reasons, the idea of multiple, user-defined hierarchies has always appealed to me. For one, it's not uncommon for the same page to appear under two different menus. As an example, on a site I'm building right now, some blog-posts double as articles that also appear organized somewhere in a category on the main menu. It's the same logical page, and it should have the same URL, regardless of whether you found it in the blog-roll or on the main menu. But because the logical and URL hierarchies are one and the same, there is no simple way to accomplish that.
Perhaps the best real-world example I can give, is a product catalog - for one company we worked with, their products were organized by two entirely different hierarchies, because their products are used in two entirely different industries. So you have two independent logical hierarchies, but the pages (and URLs) are the same.
I could provide more examples, but I think I've made my point, so I'll leave it at that.
Is multiple hierarchies a good solution, or is there another, simpler, more direct solution to these issues?