How to get a tiddler's title in plain text from a variable in [[title]] format

Hi,

I’m using Tiddlywiki 5.2.1 in Chrome and Windows 11.

I would appreciate any help with the following situation:

I have 4 tiddlers:

  • Test tiddler 1 (empty)
  • Test tiddler 2 (with a field called “linked-tiddler” with value “[[Test tiddler 1]]”)
  • Test tiddler 3 (with a field called “linked-tiddler” with value “[[Test tiddler 1]]”)
  • Test tiddler 4 with the following code:
<$list filter="[[Test tiddler 2]]">
<$set name="linked-tiddler-variable" value={{!!linked-tiddler}}>
Current tiddler is <<currentTiddler>> and is linked to <<linked-tiddler-variable>>
<$list filter="[contains:linked-tiddler<linked-tiddler-variable>]">
"Test tiddler 3" has a "linked-tiddler" field with value "[[Test tiddler 1]]" but does not appear in the list results (nor does "Test tiddler 2")
</$list>
</$set>
</$list>

I’ve made the “linked-tiddler” a list because I want it to be updated if “Test tiddler 1” changes its title. I would like “Test tiddler 4” to show all tiddlers with a “linked-tiddler” field containing the same value as the “linked-tiddler” field in “Test tiddler 2” (in this case the value is “Test tiddler 1”). I’ve been struggling with this for hours with no results. It seems that the problem is that the value of the “linked-tiddler” field is enclosed in square brackets, but I don’t know how to get the title in plain text…

Thanks in advance

Edit: did not realize you had the brackets hardcoded into the field value.

<$let linked-tiddler-variable={{{ [enlist{!!linked-tiddler}] }}}>

The core only does that for the field with the name list, not for all fields used as lists. The Relink plugin caters to most other usecases involving renaming and relinking:

https://flibbles.github.io/tw5-relink/

1 Like

Thanks a lot for your response. It works like a charm.