Hello everyone.
I thought I understood the problems I was having last week with the code due to variables inside \procedures, and I’ve managed to make functional modifications to it.
But with the following code, I don’t know what’s really happening. It doesn’t apply the values in $values, and I’m not sure why. If I replace the values with the ones I want, it works, so I think something’s wrong there.
Example: $values=" 'danger' 'callout-lateral' "
\procedure callout(type:"note", src, title, model, status, width:"100%", class)
<$let theme-class = {{{ [[$:/palette]get[text]get[color-scheme]else[light]addprefix[theme-]] }}}
callout-title = {{{ [<title>!is[blank]] :else[<type>titlecase[]] }}}
callout-model = {{{ [<model>!is[blank]addprefix[-]else[ ]] [<class>] +[join[ ]] }}}
icon-tiddler = {{{ [all[tiddlers+shadows]tag[$:/tags/TimitAdmonitions/Image]contains:callout-type<type>]
:else$:/plugins/timit/admonitions/images/note }}}
source = {{{ [<src>get[text]else<src>] }}} >
<div class=<<theme-class>> style=`width:$(width)$;`>
<$genesis $type="details"
$names={{{ data-callout class [<status>match[open]then[open]] +[join[ ]] }}}
$values="$(type)$ 'callout'$(callout-model)$" >
<summary class="callout-title">
<div class="callout-icon"><$transclude tiddler=<<icon-tiddler>> field=text/></div>
<div class="callout-title-inner"><<callout-title>></div>
<div class="callout-fold">{{$:/plugins/timit/admonitions/images/chevron}}</div>
</summary>
<div class="callout-content">
<$transclude tiddler=<<source>> field=title mode=block />
</div>
</$genesis>
</div>
</$let>
\end callout
I’ve thought about it a lot, but nothing. Thanks to @Scott_Sauyet in this post Problem with passing the value of the "status" variable in a procedure with a "details" element - #8 by Scott_Sauyet, I now have an alternative to do the same thing, but I’d like to understand what I’m doing wrong in this piece of code.
I use this code for call th procedure: <<callout type:"bug" model:"lateralb" title:"" status:"open" src:"Mi texto" class:"Pepe" width:"70%">>
Thank you very much.



And the variant you provided also works, so now I have three ways to do it.