How to Use the Text Widget via Transclusion with a Template

I tend to use the text widget a lot.

Instead of something like this:

<$text text={{{ [[HelloThere]] }}} />

I visually/semantically prefer this:

{{{ [[HelloThere]]  || txt }}}

The “txt” template tiddler has this content:

<$text text={{!!title}}/>
4 Likes

I learnt this trick from you a while ago and I’ve been using it everywhere ever since—so thank you very much!

I think you were the one who opened my eyes to the utility of filtered transclusion templates more broadly speaking, too. {{{ [[HelloThere]] || block }}} is another one I use a lot, with <$transclude mode=block /> in the “block” tiddler.

3 Likes

Damn, that’s nice! So simple, one would think it should be obvious, but I hadn’t seen it before. Thank you very much for sharing!

2 Likes

I am very much obsessed with Transclusion in TiddlyWiki because it works so much like I think. (The semantics are a natural fit for this kid.)

@etardiff’s example usage is pretty sweet.

1 Like