why does the tabs macro use :
for assigning values to parameters
instead of =
I am not able to add variables
defined by let widget as values for the parameters
for the tabs macros with :
Macros use :
and widgets use =
to assign variables.
See list-links examples for named parameters: https://tiddlywiki.com/#list-links%20Macro%20(Examples)
I’m not an expert here, but the :
is probably to actually make clear that this is a design limitation of macros. To use variables you have to use a widget. Classically you’d use https://tiddlywiki.com/#MacroCallWidget and more recently we’re told to use https://tiddlywiki.com/#TranscludeWidget. That will let you use the same macro in Widget syntax which allows for parameters to be variables.
Thank you both @stobot and @pmario for your replies and tips. I will try the transclude widget and see whether that will solve my issue
\procedure close-bottomtabs()
<$let
state-bottomtabs={{{ [[$:/state/bottomtabs/]addsuffix{!!title}] }}}
>
<$action-deletefield $tiddler=<<state-bottomtabs>> $field="text" />
</$let>
\end
<table style="border:none;width:95%;">
<tr style="border:none;width:95%;">
<td style="border:none;width:5%;vertical-align: text-top;">
<$button actions=<<close-bottomtabs>> >X</$button>
</td>
<td style="border:none;width:90%!important;vertical-align: text-top;">
<$let
state-bottomtabs={{{ [[$:/state/bottomtabs/]addsuffix{!!title}] }}}
>
<$transclude $variable="tabs" tabsList="[[$:/arsheth/cards-ui/templates/bottomtabs-fields]] [[$:/arsheth/cards-ui/templates/bottomtabs-rename]] [[$:/arsheth/cards-ui/templates/bottomtabs-import]]" state=<<state-bottomtabs>>/>
</$let>
</td>
</tr>
</table>
Everything works except the delete action. Any idea why ?
once I changed state
to explicitState
for the tabs macro, delete action also is working