Transclude a list of tiddlers with the same name as currentTiddler

64 views
Skip to first unread message

kebi

unread,
Aug 17, 2020, 10:29:02 PM8/17/20
to tiddl...@googlegroups.com
Hello guys,

My tiddlers have the following titles

Title
- Title/1
- Title/2
- Title/3

When using transclude in Title (currentTiddler) I want to show all the sub tiddlers, something like this:

<$transclude tiddler= <<tiddlers whose title starts by " currentTiddler/ " >> />

Does anyone anyone know if this is possible??

Thanks in advance.

Eric Shulman

unread,
Aug 17, 2020, 10:38:52 PM8/17/20
to tiddl...@googlegroups.com
On Monday, August 17, 2020 at 7:29:02 PM UTC-7, kebi wrote:
My tiddlers have the following titles

Title
- Title/1
- Title/2
- Title/3

When using transclude in Title (currentTiddler) I want to show all the sub tiddlers, something like this:
<$transclude tiddler= <<tiddlers whose title starts by " currentTiddler/ " >> />

Use the <$list> widget to transclude each "sub tiddler", like this:
<$list filter="[prefix<currentTiddler>] -[<currentTiddler>]">
   <$transclude mode="block" />
</$list>

Note:
This filter finds all tiddlers that start with the title of the current tiddler.  This includes the current tiddler.
Of course, you don't want to transclude the current tiddler into itself which would result in this error:

Recursive transclusion error in transclude widget

Thus, the filter also removes the current tiddler from the results,
so that only the sub-tiddlers are transcluded.

enjoy,
-e

kebi

unread,
Aug 17, 2020, 10:58:21 PM8/17/20
to TiddlyWiki
This is exactly what I was trying to accomplish,
Thanks again Eric, you keep saving me! ahah
Reply all
Reply to author
Forward
0 new messages