On Monday, August 10, 2020 at 6:21:15 PM UTC-7, kebi wrote: > > Hello guys, I'm trying to recall a macro with a reference field using the > following code > > <$macrocall $name="rememberq" id=<<currentTiddler>> question="Q" >> answer="A" reference=<<stream-root-title>>/> >> > > The problem is that the reference field only supports plain text and > <<stream-root-title>> seems to be returning something else > Here's the declaration of <<stream-root-title>>: > > <$vars stream-root-title=<<currentTiddler>> ... > >> > ... >> > Is there a way I can convert the output of <<stream-root-title>> to plain > text? >
According to the code you posted, "stream-root-title" is supposed to be the title of a tiddler, so it should work just fine as a parameter for your macro call. Also, a macro is simply a text substitution process, so whatever you define in a macro is simply inserted into the "calling" location (i.e., the parameter value). In any case, to address your question: how to convert the output of a macro call like <<foo>> into plain text... Let's suppose you have a macro that uses the <$list> widget to output a set of tiddler names based on a tag value: \define getList(tag) <$list filter="[tag[$tag$]]"> <<currentTiddler>> </$list> \end Then writing something like: <$macrocall $name="something" list=<<getList "foo">> /> will NOT work, because the output of the "getList" macro is the actual <$list>...</$list> code. To use the *results* of the macro as plain text, you can use the <$wikify> widget, like this: <$wikify name="listResults" text=<<getList "foo">> > <$macrocall $name="something" list=<<listResults>> /> </$wikify> Within the <$wikify>...</$wikify>, you can use the named variable (i.e, "listResults"). Hopefully, the above explanation doesn't cause too much confusion and helps you to resolve your problem... Let me know how it goes... enjoy, -e -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3a330276-8a4f-488f-a94d-95a729ca3c8do%40googlegroups.com.

