transcluding icon field

30 views
Skip to first unread message

Patrick RB

unread,
Aug 18, 2025, 7:09:29 AMAug 18
to TiddlyWiki
Hi,  I'm trying to use images referenced in the icon field within the body of a tiddler. 

I realise that I can transclude the image eg. <$transclude tiddler={{!!icon}}/> but cannot control size or other attributes. So have tried to use "img" with a few syntax variations eg. None work.   

[img [{{!icon}}]]
[img [tiddler={{!icon}}]]

help (code and/or understanding) would be gratefully received, kindest regards 

Eric Shulman

unread,
Aug 18, 2025, 7:52:19 AMAug 18
to TiddlyWiki
Using the "modern" $transclude widget parameters available in TW5.3.0 and above (released 01-July-2023) , you can write something like this:

@@fill:blue;<$transclude $tiddler={{!!icon}} size="10em"/>@@

Note that the $tiddler parameter has a leading $ to enable "modern" parameter handling, but the size parameter does NOT have a leading $, indicating that it is an extra parameter that will be passed to the icon tiddler for use as a variable within the SVG content definition.

You will need to upgrade from TW 5.1.24-prerelease (see https://tiddlywiki.com/upgrade) to get this new parameter handling.

Also, please note that, while this Google Group is still available, it is no longer the primary location for posting questions and discussions about TiddlyWiki and the TiddlyWiki community has moved to https://talk.tiddlywiki.org where you will find much more activity and timely responses.

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages