[Help?] List the links and backlinks of the target tiddler in a sidebar tiddler

183 views
Skip to first unread message

David Gifford

unread,
Mar 30, 2021, 2:28:24 PM3/30/21
to TiddlyWiki
Hi all

Yet another crazy hair-brained idea of mine.

Use case: you are reading a tiddler that has a lot of links to it. You want to see the context of a link, but you don't want to leave your place in the current tiddler. Also, you don't want modal popups.

My idea: a tiddler tagged either $:/tags/SideBar (or $:/tags/SideBarSegment, if one is using the Customizer plugin) that lists the title and transcludes the text field of the hard links in, and the backlinks to, the "target tiddler" (i.e., the tiddler that shows up after the hashtab in the browser bar). That way you keep your tiddler open and in place, but can see a scrollable list in the sidebar with the title and text of all the links and backlinks.

Here is an example of the look and functionality I am imagining:

At the very least, if someone could tell me how to parse "target tiddler" in a list filter, I could experiment on my own.

Alternate idea: A plugin that shows a small icon on hovering near a link in a tiddler, and when you click on the icon, the title and text of the linked tiddler appears in a sidebar tab or sidebar segment, and any tiddler that was there previoulsy in that sidebar viewing area is removed.

Obviously either of these ideas would require a wide screen and a wide setup for the sidebar. But it would be a nice alternative to the two-column approach of the Stories plugin for Stroll. It would also mean that the viewtemplate approach for viewing backlinks (again, Stroll) would be less necessary. Side by side viewing of tiddlers is better than scrolling to the bottom of the target tiddler to see what the backlinks are.

Thanks in advance for any feedback, help, snippets or links. Blessings!


Saq Imtiaz

unread,
Mar 30, 2021, 3:06:12 PM3/30/21
to TiddlyWiki
Hi Dave,

I believe someone on reddit posted something similar a while back, but unfortunately I do not have a link handy.

Where you thinking of having the zoom storyview active so only one tiddler can be open in the story at a time? 
Otherwise, we need the concept of an active or focussed tiddler in the story, which despite discussions has yet to land in the core. 

Off the top of my head, the only easy way I see to keep track of which tiddler the user last clicked on in a story, would require editing the page template.

Saq

Saq Imtiaz

unread,
Mar 30, 2021, 3:10:30 PM3/30/21
to TiddlyWiki
For your alternative idea, there is an edition that does something similar on shift-clicking tiddler links in the story:

Try  holding the shift key and clicking a red tiddler link in the story.

David Gifford

unread,
Mar 30, 2021, 3:11:01 PM3/30/21
to tiddl...@googlegroups.com
Hi Saq

Thanks for the quick response.

There must be some way to get this. When you go to Control panel > Settings, and set the Navigation Address Bar to "include the target tiddler", the browser knows which tiddler to grab and add as #. So in theory shouldn't we be able to grab the same thing?



--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/IVMObMnrk0s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/31efa2f1-be1f-4865-8e14-25442b0969b9n%40googlegroups.com.

Saq Imtiaz

unread,
Mar 30, 2021, 3:16:51 PM3/30/21
to TiddlyWiki
Aha OK now I understand what you are thinking of. The limitation here is that this value only updates when you navigate to a new tiddler via a link, but not when you just scroll to another already open tiddler and click on it.

Try this filter:

[{$:/HistoryList!!current-tiddler}]

Saq Imtiaz

unread,
Mar 30, 2021, 3:18:34 PM3/30/21
to TiddlyWiki
Perhaps a tiddler toolbar button that allows you to "pin" a tiddler to the sidebar and show information about it would be a better user experience.

si

unread,
Mar 30, 2021, 3:57:02 PM3/30/21
to TiddlyWiki
@David I might be misunderstanding, but by "target tiddler" do you mean the tiddler that you are currently viewing within the story? If so, you could use HotZone plugin.

I already do something like this to display backlinks etc in the sidebar:

<$list filter="[{$:/temp/focussedTiddler}links[]]">
<$link><<currentTiddler>></$link>
<br>
</$list>

This will refresh the list whenever you scroll to a different tiddler, without you having to click any links. I like Saq's suggestion of pinning the list to the sidebar, however. I have often considered trying to do this but never got around to it.

David Gifford

unread,
Mar 30, 2021, 5:50:30 PM3/30/21
to TiddlyWiki
Hi all

First, thanks to Saq and si for their ideas. (I saw Si's post too late, but will play around with the hotzone idea later. Sounds like a good other way of doing this)

I got my links+backlinks set up to work as far as I need it to. Check it out at:


If anyone would like to make this their own, adapt it, clean it up, package it as a plugin, host it on GitHub, I would be most pleased. I got it to work for me, and I wanted to share the idea rather than hoard it, but I am not really excited about doing any remaining work on it or maintaining it.

Anjar

unread,
Mar 30, 2021, 9:04:39 PM3/30/21
to TiddlyWiki
Hi David, 

Very interesting! It somehow reminded me of sidenotes, which are easily combined with details: a simple demo: https://andjar.github.io/tiddlytext/sidelink.html Just a thought! The macro is simple:

\define sidelink(trgt, lbl)
<span class="comment"><$link to=$trgt$>$lbl$</$link><span class ="sidenote"><details><summary>$lbl$</summary><$transclude tiddler=$trgt$></details></span></span>
\end

<style>
.comment:hover .sidenote {
background-color: yellow;
}

.sidenote,
.marginnote {
float: right;
clear: right;
margin-right: -50%;
width: 40%;
margin-top: 0.3rem;
margin-bottom: 0;
line-height: 1.3;
vertical-align: baseline;
position: relative;
}
</style>

Best,
Anders

David Gifford

unread,
Mar 30, 2021, 9:16:55 PM3/30/21
to tiddl...@googlegroups.com
Wow, I don't think I had seen Sidelinks, Anjar! It's not in the toolmap. I will both play with this and add it to the toolmap. Thanks a bunch.




--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/IVMObMnrk0s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

Anjar

unread,
Mar 31, 2021, 7:45:06 AM3/31/21
to TiddlyWiki
Thanks David - you're right, it was made especially for you, inspired by the problem you presented and the  L+BL:)

Brian Radspinner

unread,
Apr 5, 2021, 8:51:02 PM4/5/21
to TiddlyWiki
I love this idea, David, so I tried to simplify the tiddlers for my use. I don't know about proper plugins setup, so I have this JSON to drag to TW. I switched out the icon for a unicode character to keep things all in tiddlers.
L+BL.json

David Gifford

unread,
Apr 5, 2021, 9:37:22 PM4/5/21
to tiddl...@googlegroups.com
Great, Brian! FYI the icons are tiddlers too. They are system tiddlers and start with either $:/core/ui/images/_____ or $:/.giffmex/images/_____




Reply all
Reply to author
Forward
0 new messages