Is there a way to make links to tiddlers in a file tree 'pop up'?

86 views
Skip to first unread message

tam

unread,
Jun 25, 2019, 9:44:59 AM6/25/19
to TiddlyWiki
I am using the tree macro to display a file tree like so:
<<tree prefix:"root/">>

Obviously when I click on links within the tree a new tiddler is opened. This is becoming kind of cumbersome for my use and I wondered if there was a way to make the tiddlers 'pop up' instead in a way similar to <$button popup>?

Thanks for your help.

TonyM

unread,
Jun 25, 2019, 6:01:32 PM6/25/19
to TiddlyWiki
Tm,

Before I try and answer your exact question, have you tried the other forms of Table of Content macros such as

In this way the tree you are looking at is held inside a tiddler.

Regards
Tony

tam

unread,
Jun 26, 2019, 5:18:33 PM6/26/19
to TiddlyWiki
Thank you Tony that looks better suited to my use case than what I had in mind. Is there any way to get it to work with my 'file structure' (i.e. tiddlers named root/blah/etc) or will I have to rename and retag everything?

TonyM

unread,
Jun 26, 2019, 6:28:19 PM6/26/19
to TiddlyWiki
Tam

The toc macros provided by tiddlywiki operate by looking for the tiddlers tagged with each tiddler in the tree. For this reason it is easy to build a tree using the new here button.

If the tiddlers already exist you will need to tag them with the tiddler name that they need to appear below.

The existing toc and tree macros are also designed to go as many levels deep as the tags indicate.

If however you want a toc based on some other information like the content of a field you need another macro. I think Mario made one to support his "new here with parent" button.

Coincidently I need to write something similar today so I will share a toc macro you can edit today.

It is surprisingly easy if you learn about recursive code parterns. I have shared similar code before so search the forum if you are in a hurry.

Today I plan to build a multi-level hierarchy which works like a toc but uses a different condition for each level, rather than only tagging.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages