Simple way to link image to Tiddler?

80 views
Skip to first unread message

Jake

unread,
May 31, 2020, 6:03:59 PM5/31/20
to TiddlyWiki
I know it should be pretty easy, but I searched a bit on this forum before asking and read this one http://tobibeer.github.io/tb5/#Markup but haven't found the answer.

So, what's the easy way to link image to a Tiddler? 

I tried using permalinks 

<a href="file:///G:/!Notebook/TiddlyWiki/sample-tiddly.html#Sample%20One"> [img[imgurl]] </a>

but it didn't work for some reason.

I tried creating separate Tiddler with path in case I move the wiki

[[MyTiddlyWikiPath]]
file:///G:/!Notebook/TiddlyWiki/sample-tiddly.htm

<a href="{{MyTiddlyWikiPath}}#Sample%20One"> [img[imgurl]] </a>

but it didn't work either.

Soooo, what's the catch?

Jake

unread,
May 31, 2020, 6:12:38 PM5/31/20
to TiddlyWiki
PS. Well, maybe I described it not the proper way. I want to open Tiddler not in a browser (though that still doesn't work for some reasons), but just to open the needed Tiddler inside my TW. So the image would serve like some kind of button.

Jake

unread,
May 31, 2020, 6:54:41 PM5/31/20
to TiddlyWiki
Looks like partial solution is to make it an actual button:

<$button>
<$action-navigate $to="Sample One"/>
[img [imgurl]] 
</$button>

but this way the image will look like an actual button, with borders and stuff. How to make it stay looking like a normal image?

Eric Shulman

unread,
May 31, 2020, 7:23:48 PM5/31/20
to TiddlyWiki
Add "tc-btn-invisible" class, like this:
<$button class="tc-btn-invisible">...</$button>

Note also that the $button widget directly support navigation via the "to=..." param, like this:
<$button class="tc-btn-invisible" to="Sample One">[img[imgurl]]</$button>

enjoy,
-e

Jake

unread,
Jun 1, 2020, 3:18:38 AM6/1/20
to TiddlyWiki
Yes! That's exactly what I wanted! Thanks Eric!

понедельник, 1 июня 2020 г., 2:23:48 UTC+3 пользователь Eric Shulman написал:
Reply all
Reply to author
Forward
0 new messages