It seems like there’s a lot of interest in greater hierarchical organisation capabilities judging by the existence and popularity of a hierarchy tag in the forums. I know I find myself sometimes trying to organise pages that make the most sense to be organised hierarchically. This topic is my attempt and advocating why I think it would be valuable to have greater support for organising a subset of pages this way, and my suggestion for a possible implantation. I haven’t seen a topic that captures quite how I’m imagining this being potentially implemented but since this is a somewhat abstract topic and a lot has been written about it in the forums I could have easily missed something that essentially suggests the same thing. Sorry if that’s the case!
Why I think hierarchical organisation of objects is sometimes useful
In my experience a lot of relationships between pages provide additional information but aren’t fundamental to the identity of a page. For example if I have a page called “History of design” and that includes a link to a page called “Skeuomorphism” then likely both of those pages can be meaningful understood even if you take that link away.
But in my experience I find that some pages in my anytype space part of the meaning of that page comes from it’s relationship to another page. Let me give a concrete example. One pattern I have is that I’ll have a number of people objects representing various friends and family and then I’ll have some pages related to that person like so:
“Favourite foods” is a page of Felix’s favourite foods with recipes I’ve collected. That page only makes sense in the context of Felix. So if I want that page title to be meaningful I need to title it something like “Felix Smith / Favourite foods”. This is especially important for search and even more so if I have multiple “Favourite foods” pages each connected to separate people. If the pages are just titled “Favourite foods” and I search “favourite food” I’m gonna see multiple results and have no idea what person they’re connected to:
You might think “Just title it Felix's favourite foods or something and be done with it”. And sure that mostly works but I don’t think it’s ideal since that relationship is now capture in two places, in a true anytype page relationship and conceptually in the title. That has a number of downsides including:
-
Introducing multiple sources of truth. This means that adding/editing a relationship requires changing multiple places which is both a bit annoying to maintain, especially if you have many pages like this, and also introduces the possibility of them becoming out of sync. In this case Felix is probably not likely to change their name terribly often so it’s not a huge deal or anything. But this is a pattern I find myself using in quite a few different places. For example when I start a new project with a working title, build a number of pages off that project and then as the project starts to take shape, start experimenting with finding an “official” title, if I change the project title I’ll need to go update the titles of all the pages I’ve included the project title in.
-
The relationship reference in the title doesn’t offer the affordances of a true relationship. If I have a page called “Felix Smith / Favourite foods” (again just an example of this pattern) it would be nice to be able to click on “Felix Smith” and be taken to that object and see all the other objects connected to it.
How I’m imaging this use case could be better supported
I’m thinking it would be nice if there was a way that certain page relationships could be setup that such that are marked as important to the meaning of a page. Perhaps this would be implemented as a “Parent objects” relationship. Then on any object this could be added to the in the same way that any other relation is added. And this relation would allow you to selection other objects to be “parents”. Then the page view of any objects that are parents of other objects would have a way of displaying any child relationships (and possibly adding/removing them). This is tricky because ideally you’d want to allow the user to customise that children list to there liking (change how predominately they’re displayed, grouped by different headings, etc) but you’d also want anytype to keep that list up to date automatically so that it can’t become out of sync with children that have set it as their parent. Not sure how this could best be done!
Once there’s a system in place for capturing these relationship it would be great to have Anytype can do things like include that relationship context when searching for a page. Eg:
I could see this integrating nicely with the idea of blocks being treated as objects. Instead of “Favourite foods” being just it’s own page maybe it’s page + a block on the “Felix Smith” page with it’s contents being nested under it. Then when searching I’d see it listed in the same way as before (“Felix Smith /
Favourite recipes”) and selecting it would take me to that section of the “Felix Smith” page (or to a page view of just the “Favourite recipes” since in this scenario if blocks were treated more like objects I’m imagining they’d have their own page view).
Now you might notice that all of this introduces a new kind of ambiguity. If I have a single “Favourite foods” page related to multiple people (or if this was implemented using the “everything is a block” approach, then having that same “Favourite foods” block included in the page contents of multiple people) that raises the question what would the search results show? My suggestion is that it would show up as multiple results, one for each relationship. So “Felix Smith /
Favourite recipes” and “Other Person /
Favourite recipes” would both show up in the search results even though they’d link to the same object. My thinking is that if I’ve decided to relate that page to multiple different people then it has multiple different contexts in which it’s relevant. If I were to search “felix food” I’d expect it to show up under that but I’d also expect it to show up if I searched “other person food”.
I know this is all pretty rambly and abstract so thanks for taking the time to read and consider!


