A Simple List Tree with: List Field and List Operator

\define xtree(root)
<details open><summary><$link><$text text=<<__root__>> /></$link></summary>
<div class="outer">
<$list filter="[list[$root$]]">
<$list filter="[list<currentTiddler>limit[1]then<currentTiddler>]" emptyMessage='<$link/><br>'><!-- inner list -->
<div class="inner"><$macrocall $name=xtree root=<<currentTiddler>> /></div>
</$list>
</$list>
</div>
</details>
\end


<style>
.outer{
padding-left:10px;
border-left:2px solid blue;
}
.inner{
padding-left:20px;
}
</style>

!! Example
<<xtree root:Root>>

Create a Root tiddler with list field contains some tiddlers, and some of them again have list field with other tiddlers and so on…

Demo

msedge_q7Lgmnd88M

So, list filed is so important and needs more attention

2 Likes

For @TW_Tones.

As you explained in another post, list field can be used to create virtual folder.
This is a simple example (in comparison to Favorites plugin), but it gives some clues to
create other useful tools.

2 Likes

This subject is in effect “pure research” into tiddlywiki, for now I suppose I must be a little more practical, but I cant resist.

As in another recent post “virtual folders” are in fact a subset of what we could call virtual tiddlers, or titles of tiddlers that do not “yet”, or may never exist.

Of course the common name given to these are “missing tiddlers” and can be listed, manipulated and backlinked. There is also the case of a tag, you can have a tag, that does not have a tag tiddler (in fact by default), but exists only as an entry in a tag field, yet we can use this in complex filters and lists.

In other applications we may have something such as a keyword or category field containing a list of values. these too also resemble virtual tiddlers.

It is an interesting space to play in and interestingly “titles” could even be more “fundamental in nature” than tiddlers. In so far as, tiddlers are a manifestation or embodiment of titles. I wonder if @jeremyruston has speculated in this area?.

It is worth exploring this “opportunity space” and see if we can push this further,

  • What can we do with virtual tiddlers, and with just another list field what new meaning can we create?
  • for example in your example @Mohammad I expect you need the “folders” to exist and have a list field, perhaps there are ways to even virtualise those - certainly this can be done with titles using compound titles such as the system tiddler pattern delimited by “/”.

I recently developed a similar method I mentioned in relation to your favorites plugin, for processing protocol links such as urls; For example with the url to this thread I get;

And in particular this link to my key tiddlywiki Snag_bdea261

  • notice how by providing a single link it finds the valid locations, ie all those in the path.
  • I: drive
  • !Master folder
  • KeyWikis folder
  • The tiddlywiki file
  • The little icon is a guess, it appends /wikibackups which is where you find the backups using Timimi.

Once again we find in yet another small corner of tiddlywiki another fractal universe of possibilities.

Maybe it could be used to frame a novel…or a tiered assignment of tasks…