Simplest way to list all tiddlers that transclude the current tiddler?

143 views
Skip to first unread message

Evan Hackett

unread,
Jul 22, 2021, 1:29:24 PM7/22/21
to TiddlyWiki
Hey everyone, this is my first post here, sorry if I'm asking a common question.

Basically I have constructed a footer that displays all backlinks of the current tiddler, and I want to extend it to also display all transclusions as well. 

I know this is possible because I use the relink plugin, and it seems to have similar functionality. I just can't figure out how to harness it for myself!

My footer currently looks like this:

<div class="footer">
  <hr>Backlinks: 
  <br>

  <div class="footer-references">
    <$list filter="[all[current]backlinks[]sort[title]]" emptyMessage="">
      <$link to={{!!title}}><$view field="title"/></$link>
      <br>
    </$list>
  </div>
</div>

Let me know what you think. Thanks everyone!

Soren Bjornstad

unread,
Jul 22, 2021, 4:16:04 PM7/22/21
to TiddlyWiki
This isn't supported in core currently, though there's a pull request about it that needs a bunch of work to be mergeable that I keep harping on because I want this too. :-) If I get some time in the next couple months and nobody else does it, maybe I will take a look at how to get started with TW core development.

In the meantime, the relink plugin implements its own filter operator for this, though as I understand, it is undocumented and might change behavior in future versions of Relink. See this recent thread.

Saq Imtiaz

unread,
Jul 22, 2021, 4:35:10 PM7/22/21
to TiddlyWiki
 If I get some time in the next couple months and nobody else does it, maybe I will take a look at how to get started with TW core development.


Would be happy to answer any questions you might have along those lines.

Evan Hackett

unread,
Jul 23, 2021, 12:46:39 PM7/23/21
to TiddlyWiki
I had a feeling it wasn't supported, because I looked through all the filter operators and nothing stuck out at me as being what I wanted. So since I am using the relink plugin, does that mean I can call its operators in my own tiddler? So far I've been unsuccessful getting something to work, but I'm probably just doing it wrong.

Looking at that thread that was linked, I copied some code and tried to get it to work but so far unsuccessful. I tried this along with various tweaks:

<$list filter=" [!is[system]all[current]relink:backreferences[]!title[$:/StoryList]sort[title]]">
        <$link to={{!!title}}><$view field="title"/></$link>
</$list>

Nothing shows up. Does anyone have a snippet that they could share?

Soren Bjornstad

unread,
Jul 23, 2021, 2:06:30 PM7/23/21
to TiddlyWiki
Your snippet works for me when placed in a tiddler that has links or transclusions to it from other tiddlers.

Just to be sure, did you try saving the tiddler rather than just looking at the preview? all[current] will be a draft tiddler if you're looking at the preview, so it probably won't find anything.

BTW, the !is[system] in your filter isn't doing anything because all[current] completely ignores its input.

Evan Hackett

unread,
Jul 23, 2021, 11:43:48 PM7/23/21
to TiddlyWiki
Really? I just tried the snippet again to double check, and it isn't working for me. Yes I saved the tiddler, nothing shows up.

Do you think there could be some other reason it isn't working? Perhaps incompatible versions or something?

Here's more info in case it helps:

TW version: 5.1.23-prerelease
Relink version: 1.10.0
Other plugins: Core, Filesystem, Highlight, TiddlyWeb
Browser: Brave Version 1.26.74 Chromium: 91.0.4472.124 (Official Build) (x86_64)
Computer: Macbook Pro

Evan Hackett

unread,
Jul 24, 2021, 3:48:14 PM7/24/21
to TiddlyWiki
Just wanted to update: I got things working by updating my TW version as well as my Relink version. Now I'm on TW 5.2.0-prerelease and Relink 2.0.0.

So my issue is resolved! Thanks everyone!
 

Soren Bjornstad

unread,
Jul 24, 2021, 7:06:24 PM7/24/21
to TiddlyWiki
Ah. The behavior of that filter operator changed in Relink 2.0.0, so that was probably your issue.
Reply all
Reply to author
Forward
0 new messages