Shiraz image-card macro question

80 views
Skip to first unread message

grimes313

unread,
Apr 24, 2020, 7:35:29 AM4/24/20
to TiddlyWiki
Hey everyone,

I need help with a macro from the Shiraz plugin; not sure if this is the proper place to ask.

I'm trying to use image-card by passing attributes via tiddler fields, however I can't seem to make the main thing--that is, the actual image--work. As can be seen on the attached screenshot, calling the macro by typing in the image name works just fine, but not when I try to make it pull the name from a field.

I'm quite new to TW and I'm still wrapping my head around it, so I don't doubt I'm missing some basic concept here. Can anyone tell me what I'm doing wrong?


image-card.png

Mohammad

unread,
Apr 24, 2020, 8:47:57 AM4/24/20
to TiddlyWiki
Hi grimes313,

When you want to pass variable or transcluded field use $macrocall widget

In your case you can try 

<$macrocall $name=image-card img={{!!field1}} title=...



--Mohammad

Saq Imtiaz

unread,
Apr 24, 2020, 8:53:27 AM4/24/20
to TiddlyWiki
You cannot pass text references or filtered parameters to macros with that syntax. 
Use the widget version instead:

<$macrocall $name="image-card" img="placeholder.png" title={{!!field2}} text={{!!field3}} align="" width="100" pos="bottom" />

Saq Imtiaz

unread,
Apr 24, 2020, 8:53:51 AM4/24/20
to TiddlyWiki
See https://tiddlywiki.com/#MacroCallWidget for further details.


On Friday, April 24, 2020 at 1:35:29 PM UTC+2, grimes313 wrote:

grimes313

unread,
Apr 24, 2020, 5:28:18 PM4/24/20
to TiddlyWiki
Awesome! Thank you both for the help, and thanks Mohammad for the amazing plugin! :)
Reply all
Reply to author
Forward
0 new messages