I am a fan of tree data structures, thus I use the Table of Contents concept very often to organize tiddlers in my wikis. I am familiar with the pros and cons of trees, I also know about other schools of knowledge management, like the Zettelkasten one, where cards are loosely coupled via references - I’ve tried that approach as well, but trees just work better for me. Maybe it’s the nature of the data I’m recording (mostly computer related, technical).
The intro above being listed mostly for context, I like the ToC as a view from a bird’s eye of a subset of tiddlers - sometimes it provides refactoring hints, like the need to move a leaf or a whole branch to another place in the tree. Luckily, this is done easy by changing a tag and letting the Relink plugin handle the renames automagically.
My question is about the relationship in the opposite direction. If I have a tiddler open in the story river and I know it belongs to a ToC - I even have some custom code (based on ancestors third party filter) that shows me the location of the tiddler in the ToC. My problem is that to get there, I have to go to the tiddler containing the ToC and click a lot to open the nodes until I get to the tiddler. I have no idea how to approach the problem but would it be possible to automate this? I would like a custom button or something in each tiddler that would:
- Open the tiddler containing the ToC
- Auto-expand all the nodes until the tiddler in the ToC becomes visible
- Center the ToC on the screen so the tiddler where tge button was clicked is in the middle