TiddlyWiki Transclusion 101 question about displaying multiple tiddlers in a single tiddler

78 views
Skip to first unread message

Jack Baty

unread,
Jan 4, 2019, 1:35:56 PM1/4/19
to TiddlyWiki
I would like to collect (via tag or some other criteria) a number of tiddlers and display them all within another, single tiddler. This seems so basic and yet I can't seem to find an example. The other threads in the group all seem to be about solving much more complex issues so whooooosh, right over my head they go.

For example, say I've made a bunch of small, one-paragraph tiddlers about different facets of a topic. I now want to collect those and display them, each fully rendered, in a sort of "parent" topic tiddler. I'd like to include the title and possibly the date for each as well.

No amount of fiddling with the list macro or transclusion with templates has yielded what I'm looking for. I'm new here so maybe there's a more suitable approach I should be looking into.

Thanks for any guidance you might have.

Jack

Jed Carty

unread,
Jan 4, 2019, 2:02:13 PM1/4/19
to TiddlyWiki
You are looking for the list widget.

If you have a tag called MyTag than you would use this

<$list filter='[tag[MyTag]]'>

<$transclude/>

</$list>

I wrote some introductory documentation for this, but I never got around to really finishing it. You can see what I have here: http://inmysocks.tiddlyspot.com/#Learning%20TiddlyWiki

Mark S.

unread,
Jan 4, 2019, 2:05:44 PM1/4/19
to TiddlyWiki
Something like this:

<$list filter="[tag[HelloThere]]" template="$:/core/ui/ViewTemplate"/>


perhaps?

Jack Baty

unread,
Jan 4, 2019, 2:23:47 PM1/4/19
to TiddlyWiki
I was struggling with $transclude so kind of gave up. Thanks for pointing be back in the right direction!

The trick for me was having the mode parameter set to "block. I also wanted the title for each and it turns out that's as easy as using another $transclude macro with field="title". I also learned that whitespace is important and putting newlines between things worked much better.

So it's just something like...

<$list filter='[tag[MyTag]]'>

<h3><$transclude field="title" /></h3>

<$transclude display="block" />

</$list>

I knew it should be easy! :) Thanks again.

Jack

Jack Baty

unread,
Jan 4, 2019, 2:25:16 PM1/4/19
to TiddlyWiki
That sort of works. It includes the entire tiddler, including tools and wrappings so it's more than I actually need in this case.

I do need to investigate the View Templates further, so thanks!
Reply all
Reply to author
Forward
0 new messages