I have created a small button to restore the problem I am experiencing, the button code is below. Theoretically, when the button is clicked, it triggers the judgement inside. And in case the judgement condition is true, it triggers the code inside further. But obviously this didn’t work. Even when I put the conditional shortcut syntax content outside, it doesn’t work.
<$let tiddlerName=<<currentTiddler>> >
<$button>
<$action-confirm $message="Whether to create a new series of child entries">
<$list filter="[[-info]] [[-toc]]" variable="suffixName">
<$action-createtiddler $basetitle={{{ [<tiddlerName>addsuffix<suffixName>] }}} tags=<<tiddlerName>>/>
</$list>
<%if [<tiddlerName>addsuffix[-toc]is[tiddler]] %>
<$action-setfield $tiddler={{{ [<tiddlerName>addsuffix[-toc]] }}} cluster="toc"/>
<$action-createtiddler $basetitle={{{ [<tiddlerName>addsuffix[-toc-adrift]] }}} tags={{{ [<tiddlerName>addsuffix[-toc]] }}} />
<%endif%>
<%if [<tiddlerName>addsuffix[-info]is[tiddler]] %>
<$action-setfield $tiddler={{{ [<tiddlerName>addsuffix[-info]] }}} cluster="book-info"/>
<%endif%>
</$action-confirm>
Create
</$button>
</$let>
Putting it outside.
<$let tiddlerName=<<currentTiddler>> >
<$button>
<$action-confirm $message="Whether to create a new series of child entries">
<$list filter="[[-info]] [[-toc]]" variable="suffixName">
<$action-createtiddler $basetitle={{{ [<tiddlerName>addsuffix<suffixName>] }}} tags=<<tiddlerName>>/>
</$list>
</$action-confirm>
<%if [<tiddlerName>addsuffix[-toc]is[tiddler]] %>
<$action-setfield $tiddler={{{ [<tiddlerName>addsuffix[-toc]] }}} cluster="toc"/>
<$action-createtiddler $basetitle={{{ [<tiddlerName>addsuffix[-toc-adrift]] }}} tags={{{ [<tiddlerName>addsuffix[-toc]] }}} />
<%endif%>
<%if [<tiddlerName>addsuffix[-info]is[tiddler]] %>
<$action-setfield $tiddler={{{ [<tiddlerName>addsuffix[-info]] }}} cluster="book-info"/>
<%endif%>
Create
</$button>
</$let>
Does this mean that the conditional shortcut syntax is just replacing the text or displaying the text and not executing the next judgement logic. I got the solution from AI using list
widget which was commonly used before the advent of conditional shortcut syntax. So more than solving the problem, I would like to know what is being processed behind the conditional shortcut syntax and whether it can perform more code logic. Or maybe it’s just a problem in action-confirm
.