How to set with "$action-setfield" a value that is a transclusion

I don’t know if the title is correct, because I don’t know if I used the right terms. The problem occurs in this piece of code:

-Info of: "{{Open Info!!Tiddler-Info}}"
<$tiddler tiddler={{Open Info!!Tiddler-Info}}>
{{||$:/core/ui/TiddlerInfo}}
</$tiddler>
<hr>

<div class="tc-sidebar-tab-open">
<$list filter="[list<tv-story-list>]" history=<<tv-history-list>> storyview="pop">
<div class="tc-sidebar-tab-open-item">
<$button>
<$action-setfield $tiddler="Open Info" $field="Tiddler-Info" $value="???"/>
{{$:/core/images/info-button}}</$button>

<$link to={{!!title}}><$view field='title'/></$link>
</div>
</$list>
<$tiddler tiddler="">
<div>

(Open Info is the name of the tiddler that contains what I wrote above)

What I would like to do is insert (where for now I have put “???”) as a value “{{!!title}}”.
Of course I tried to put that literally, but doing so produces litterally “{{!!title}}” and not the title of the tiddler.

Some guesses:

  • A syntax error: I can enter {{!!title}}, but with a syntax I don’t know

  • As I put {{Open Info!!Tiddler-Info}} - specifying the tiddler to which the field refers, I have to do it also with {{!!title}}, thus: {{XXX!!title}}. But I don’t know what to put in place of XXX.

Below I am attaching an image which gives a preview of how the code should work.

<$action-setfield $tiddler="Open Info" $field="Tiddler-Info" $value={{!!title}}/>

See “Transcluded Attribute Values”: https://tiddlywiki.com/#HTML%20in%20WikiText

This part in particular is interesting:

Here I used a transcluded attribute value, but you could use a variable, a filtered attribute value, etc

1 Like

Thanks @telumire and thanks for the link with the explanation. I assumed the quotation marks were needed. Now it works, wonderful. :clap:t2:

1 Like