In a macro I want to use something like <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> to define a state tiddler but instead of using $n$, use a sha256 of another parameter of the macro, named src. What is the right syntax?
Try this:
<$let .state={{{ [<.state-prefix>] [{!!title}] [[/]] [<__src__>sha256[]] +[join[]] }}}>
Notes:
- Instead of using a
$listwidget, you can use a$letwidget to set the.statevariable, where the assigned value is constructed using “filtered transclusion”. - The
titlefilter operator is not needed… just refer to the<.state-prefix>variable. - Instead of using the
addsuffixfilter operator to construct the.statevalue, you can use separate filter runs for each part of the value, and then connect them all using+[join[]]
2 Likes