Create an hierarchical list of notes

Hi guys, I really need an hierarchical view to my MOC and I couldn’t find a way to
properly achieve what I want.

a) What files I have:

  • a note called Index (this note is outside of any folder)
  • a folder called Everything, containing the next notes:
    Note number 1
    Note number 2
    Note number 3
    Note number 4
    Note number 5
    Note number 6

b) How the content of my Everything notes is organized:

  • each note has headings with some content
  • in every note I set aliases property in order to provide address to track the hierarchy of that note.
    Because of alias my note can be on several hierarchies, not only one.
    Eg.: Note number 4 is part of two different hierarchies - noteNumber1/noteNumber2/noteNumber4 and noteNumber3/noteNumber4

c) What I want to achieve:

I want to create a automatic list on my Index note that shows all notes of the folder Everything following these conditions:

  • The name showed on this list is the name of the file, not the name of the alias
  • The list is sorted accordingly to the alias
  • The list has indentation accordingly to the hierarchy level of the alias
  • Display the headings of each note as bullet points (just in order to show the headings, it’s not a block link)

Is there a way to achieve this list automation through dataview or something else? :pleading_face:
Having this panoramic view of my contents would be LIFE CHANGING for me!
Thanks in advance :blush:

A few comments related to your request:

  • How do you connect noteNumber1 and Note number 1? Although visually similar, they’re not easily comparable
  • Using pure Dataview it should be doable to build a list/table based upon a flattened version of the aliases containing forward slashes, and then group by such a topic alias
  • However, the pure version is very bad at doing hierarchical stuff so that might need dataviewjs
  • Also, to extract headings you’ll need to venture into javascript and traversing the metadataCache
  • So I guess what I’m wondering is whether you’ve got any coding experience, and what you’ve tried so far?

Hi @holroy , first of all thanks for your time! :blush:

noteNumber1 is set as an aliases property of Note number 1. It works like an hierarchical path for Note number 1. In this case noteNumber1 acts like the first level of hierarchy since Note number 1 won’t have any notes before.

Unfortunately I don’t have javascript coding experience. I’ve been looking for days in forums some partial solutions I could copy (for example I found this for folders organization, and this using tags for hierarchy sorting instead of alias) but none of them results in this level of detail and organization I am looking for :confused: