Premise
Following the discussion here I think I have a viable and concise proposal to address most use cases of the “hierarchically organize pages/tags”.
The point is specifying hierarchies using page properties.
For me the ideal would some syntax that, given an arbitrary user-defined <property>
, (for example extends::
), looks like this:
Specify relations between pages
Parent.md
<property>:: [[Child]]
Child.md
<property>:: [[Teddy]]
Display these relations
Tree
{{tree <property>}}
displays an indented list of pages by following that <property>
specified by the user, i.e.
- [[Parent]]
- [[Child]]
- [[Teddy]]
Reverse tree
{{reverse-tree <property>}}
display another indented list but by following <property>
in the other direction:
- [[Teddy]]
- [[Child]]
- [[Parent]
Breadcrumb
{{breadcrumb <property>}}
used in a page involved in the hierarchy above, for example Child.md
, displays:
[[Parent]] > [[Child]] > [[Teddy]]
in case Child.md
is involved in a more complex hierarchy it would be:
[[Parent 1]] > [[Child]] > [[Teddy 1]]
> [[Teddy 2]]
[[Parent 2]] > [[Child]] > [[Teddy 1]]
> [[Teddy 2]]
Reverse breadcrumb
(you got the idea)
Graph view
In addition it would be nice to display in the graph view only certain relations and not other ones (including “reference” that is the only type of relation we have now in the graph view).
For me it would be also useful to display the graph directly on a page with the command:
{{graph <property>}}
and for the graph of the current page only (like the one we already have in the sidebar):
{{page-graph <property>}}