Double-quotes are only for passing literal text.
To pass a field value, just use double curly braces, like this:
<<MacroName {{!!FieldName}}>>
Also, take note that because the double angle brackets surrounding the macro invocation don’t nest, when you want to pass a variable value, you need to use the $macrocall widget, like this:
I’m still not getting the field value. I am actually doing something a bit more complicated, and I guess I should have posted this before. But I am trying something like this:
I honestly tried to make that work, but I couldn’t figure it out.
What I have tried is something like this, where I am trying to replace the @ symbol with “TD” tags:
Don’t use Tobibeer’s split plugin. It was written before the TWCore had it’s own split[] filter operator, and is incompatible (specifically, if the split symbol doesn’t exist in the input, Tobibeer’s plugin returns an empty result, while the TWCore returns the entire input, unchanged). Using Tobibeer’s plugin will cause errors in the TWCore’s use of split[].
The $list widget gets the fields that start with cast-list. Note: it’s a bad idea to use spaces within fieldnames. I suggest using something like cast-list-0, cast-list-1, etc.
Each <td> takes the field value (with content of the form actor@role) and splits it at the @ symbol. The first <td> shows the actor text, the second <td> shows the role text.
Also, here’s an alternative that, instead of using separate fields for each cast/role entry, uses a single field to hold the entire cast list (e.g., “[[actor@role]] [[actor@role]] [actor@role]]”)
The $action-listops joins the two inputs together (e.g. actor@role) and automatically adds doubled square bracket as needed, so you don’t have to type them.
In @CodaCoder’s example, the cast variable set by the $list widget will be the fieldnames that start with cast-list.
To produce the correct output, the <$text> widgets would then need to use filtered transclusions to get the actual fieldvalues like this: {{{ [<currentTiddler>get<cast>split[@]first[]] }}}
and {{{ [<currentTiddler>get<cast>split[@]last[]] }}}
The solution is elsewhere in this thread thanks to eric, I just wanted to share a general rule, triggered by this example (which is now not relevant), but can provide a narrative way to consider tiddlywiki syntax.
Filters as with wiki text make use of various symbols to indicate different things. Such as {transcludethis} {!!currentfield} and <variable> . Like Einstein imagined sitting on a light beam, it can be helpful to imagine you are tiddlywiki trying to respond to your code.
When I do this I expect tiddlywiki to ask when seeing [</td><td>] are you referring to two variables inside an operand?
Thus to keep it simple it is better to “abstract” this so the filter remains clear;
That is any "strings that may confuse the syntax are saved in a macro/variable, and that macro variable is used instead.
The as a result tiddlywiki is much less likely to get confused and simply do as asked.
In a similar vein I think it important to consider that tiddlywiki already handles in wiki text html, such as <br> <hr> or even <details> so the idea of using macros and variables tiddlywiki “needs” double symbols <<macro>>to tell them apart from html, however since filters do not need to honor html then only one open and close symbol is needed eg; <td-to-td>. In the same rule in wiki text, but not filters, we need to use double symbols eg: {{tiddlername}} {{!!currentFieldname}} and with filtered transclusions we need another depth to set them apart {{{ filter }}}.