Backlinks: would it be worth asking for this enhancement?

119 views
Skip to first unread message

Charlie Veniot

unread,
Mar 23, 2021, 11:29:25 PM3/23/21
to TiddlyWiki
G'day all,

The "Can we customize internal links?"  got me thinking ...

Would it be useful for "backlinks" (the operator and the InfoPanel tab) to consider not only links but also consider transclusions as links?

I can't help but think it would be helpful to use transclusions with templates to create very customized links.

For highly customizable links: Instead of a link like [[some_tiddler]], one could instead have {{ some_tiddler || some_link_styling_template }}

I suppose I don't see a distinction between a link to a tiddler and a transclusion of a tiddler in the sense that I consider one being a backlink just as much as the other.

Any thoughts?  Would this be worth putting in as a formal request?

Of course, even if something could be done, I always like to pause for a second and wonder: should it?

Mat

unread,
Mar 24, 2021, 3:28:46 AM3/24/21
to TiddlyWiki
At first I thought you were out in the woods... but maybe you're onto something!

Transclusions with templates do indeed let you show anything, including just a plain link as if it is a plain link. In another thread I am asking if we could make [[bracket links]] more intelligent so they do different things depending on content. I gave these examples:
  • ...Clicking on [[Bob Ross]] in the in the "Profiles" tiddler opens the "Bob Ross" tiddler but clicking on [[Bob Ross]] in the "Contact us" tiddler opens a "sendto" tiddler.
  • ...and clicking on [[Bob Ross]] when he is tagged with "Alert" does something special
  • ...and clicking on [[bobross]] also opens the "Bob Ross" tiddler because I've made missing links cleverly guess tiddler or look them up in a dictionary.
My hope in that thread is that there's some way to manipulate "the mechanism" for whatever is used when [[this]] is converted into this. I'm hoping there is, or could be, a template that is used for this conversion that could be manipulated. The main point is to NOT have to fiddle with widget commands that totally interrupt ones mind flow (which is essential during e.g live note taking or when authoring prose in TW, as opposed to hacking in TW). But your idea here might just solve this! At least partly because one would still have to specify template. - Does {{transclusion}} without any specified template use a default template that can be manipulated? Then, for your backlinks idea, it could be made so that calling the transclusion at, say, the very bottom of a tiddler automatically means it should be for backlinks.

So we can do this {{||backlinks}} to show backlinks in the current tiddler.

And one could design a template for {{||template}} that intelligently/contextually shows different things, like in my example above.

<:-)

Mat

unread,
Mar 24, 2021, 3:30:32 AM3/24/21
to TiddlyWiki
That should read:

In another thread I am asking if we could make [[bracket links]] more intelligent so they do different things depending on conteXt. (not "content")

<:-)

Soren Bjornstad

unread,
Mar 24, 2021, 7:15:43 AM3/24/21
to TiddlyWiki
There was a thread about this on GitHub a while back:

The consensus that making transclusions discoverable was a good idea but needs to be split into two parts so you can distinguish links and transclusions.

Charlie Veniot

unread,
Mar 24, 2021, 8:49:19 AM3/24/21
to TiddlyWiki
Here's a code pattern/example from my Tifoist Project, starting first with a screenshot for one of my types of links created via transclusion template magic:

Screenshot 2021-03-24 9.15.57 AM.png

So the links to tiddlers "FAct-000001" etc. are created as per code below:

{{ || fLmg}}

(The tiddler name isn't "there" in this sample because the link is created for the "current tiddler" within <$list> </$list> processing)

And the "fLmg" template:

<$text text={{{ [all[current]split[#️⃣]!is[blank]nth[]] }}}/>
^^<$button message="tm-modal" param={{!!title}} class="tc-btn-invisible" style="color:#0a00ee;text-decoration-color:#0a00ee;" tooltip={{{ [[Details for "]] +[addsuffix<currentTiddler>]  +[addsuffix["]] }}}><span style="background-color:white;">🛈</span></$button>
<$list filter="[[$:/state/sidebar]get[text]]+[match[yes]] [<currentTiddler>] +[replace[yes]]">
<$link to={{!!title}}  tooltip="Open Transcluded Source Tiddler"><span style="background-color:white;">🐟</span></$link></$list>^^

I make fairly heavy use of transclusion templates.  To help me remember which is which, I keep a reference of the template tiddlers (and other types of tiddlers) in the sidebar.  (See attached screenshots.)

Yup:   out in the woods, out of my tree, out in left field, out to lunch.  I think it is in my DNA, but I didn't inherit it.  As a baby, I may have been dropped one too many times.  Or maybe that time as a toddler when I got drunk watching a football game with my dad and uncle who were both giving me sips of their beer ...

TOTAL ASIDE AND COMPLETELY UNRELATED:  My eyeballs have been increasingly (yet inconsistently) getting blurry over the last two years.  Coinkiedinkely, I bought my current lappytop about two years ago.  For the $hit$ and the giggle$, I recently purchased a cheap three-pack of "blue light blocking" glasses and have been wearing them for the last week, and the difference (eye strain and bluriness) is really amazing.  Since I am now a believer (well, at least not-so-skeptical), I am hollering for everybody to give these types of glasses a hearty try!  Keep yer cranial orbs healthy!


Screenshot 2021-03-24 9.32.47 AM.png
Screenshot 2021-03-24 9.29.21 AM.png
Reply all
Reply to author
Forward
0 new messages