Transclusion in popups

196 views
Skip to first unread message

Peter Buyze

unread,
May 4, 2020, 12:04:34 PM5/4/20
to TiddlyWiki forum
@David Gifford:

Dave, many thanks for this very nice plug-in, which I installed, and then started to change my TW's internal links with the HTML code

<div class="tooltip">YYY<div class="tooltiptext"><$transclude tiddler="ZZZ" mode="block"/></div></div>

I stopped after doing a couple of tiddlers, however, because I noticed that the backlinks are not shown anymore.

I have put 3 test tiddlers here: http://peterspottiddly.tiddlyspot.com/

In Tiddler 1 I put the transclude code referring to Tid 2. On Tid 2 there is no backlink to Tid 1.
In Tid 3 I also put the same transclude code referring to Tid 2, PLUS a conventional [[Tiddler 2]] link. It is the conventional link that is shown in Tid 2 as a backlink. If you delete that conventional link in Tid 3, you'll see Tid 2 no longer has a backlink to 3 shown.

Conclusion
The transclude code for tooltips works fine (not on Tiddlyspot BTW), but it means no backlinks. If I want to keep the backlinks too I will have to also put, e.g. at the bottom of the tid, a conventional link to the referring tid (as per Tid 3).

Is what I am saying right or is there another way to preserve backlinks while also making use of the tooltips?

--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:

Birthe C

unread,
May 4, 2020, 12:30:41 PM5/4/20
to TiddlyWiki
Peter,

I do not see any popups either. Are you missing some tiddlers?

Birthe

Peter Buyze

unread,
May 4, 2020, 12:57:29 PM5/4/20
to TiddlyWiki forum
If you are referring to the 3 tiddlers on Tidlyspot, then I can only say that the popups don't work in Tiddlyspot, for whatever reason. The popups do work on my local TW.

In any case, my point is not the popups but the backlinks that are no longer identified.



4 May 2020, 19:30 by strikke...@gmail.com:
Peter,

I do not see any popups either. Are you missing some tiddlers?

Birthe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mat

unread,
May 4, 2020, 1:04:23 PM5/4/20
to TiddlyWiki
1) to get the tooltip popup to work I assume there must be some stylesheet for this. Did you include this?
2) I can think of no reason why the tooltips and the backlinks should not work simultaneously, i.e in the same wiki. 
3)...However, do you mean that you want the backlinks to show inside the tooltip popup? If that is the case, the popup must also show the backlinks viewtemplate. However, the viewtemplate must "think" that it is inside the correct tiddler. This is done with the TiddlerWidget. So your code would be something like:

<div class="tooltip">
bla bla
<div class="tooltiptext">
<$transclude tiddler="Tiddler 2" mode="block"/>
<$tiddler tiddler="Tiddler 2">{{||$:/.giffmex/ViewTemplate/refslinks}}</$tiddler>
</div>
</div>


<:-)

Birthe C

unread,
May 4, 2020, 1:18:30 PM5/4/20
to TiddlyWiki
Peter,

In tiddler 1 you have no links in the tiddler, you have a tooltip.

Birthe

Peter Buyze

unread,
May 4, 2020, 1:26:45 PM5/4/20
to TiddlyWiki forum
Mat, in my local wiki the tooltip popups work fine, I have no complaints about them. I don't know why they don't work in Tiddlyspot but it does not matter because my issue is not that.

My issue is that because the reference from Tiddler 1 to Tiddler 2 resides in this code
<div class="tooltip">YYY<div class="tooltiptext"><$transclude tiddler="ZZZ" mode="block"/></div></div>
Tiddler 2 does not show the backlink to Tid 1 at the bottom of Tid 2.

If there is a conventional reference to Tid 2, i.e. [[Tiddler 2]], as is done in Tiddler 3, then the backlink works as it should. For completeness sake I have also included a reference from Tid 3 to Tid 2 with the tooltip transclusion code. If you delete that but leave the [[Tiddler 2]] reference, you'll see that Tid 2 still shows the Tid 3 backlink.


4 May 2020, 20:04 by matia...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Peter Buyze

unread,
May 4, 2020, 1:28:57 PM5/4/20
to TiddlyWiki forum
Birthe, in Tid 1 there is no conventional link to Tid 2, i.e. [[Tiddler 2]], there is a tooltip reference to Tid 2.


4 May 2020, 20:18 by strikke...@gmail.com:
Peter,

In tiddler 1 you have no links in the tiddler, you have a tooltip.

Birthe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Birthe C

unread,
May 4, 2020, 1:40:51 PM5/4/20
to TiddlyWiki
Peter,

For me it works fine on tiddlyspot, if I have the necessary tiddlers. I do need to write the link though, no link - no backlink.

Why do you expect at tooltip and a transclusion to link to anything?

Try writing:
<div class="tooltip">[[Tiddler 2]]<div class="tooltiptext"><$transclude tiddler="Tiddler 2" mode="block"/></div></div>

Birthe

Peter Buyze

unread,
May 5, 2020, 12:02:09 AM5/5/20
to TiddlyWiki forum
Yes, that did the trick. Before starting this thread I did try

<div class="tooltip">bla bla<div class="tooltiptext"><$transclude tiddler="[[Tiddler 2]]" mode="block"/></div></div>

and 

<div class="tooltip">bla bla<div class="tooltiptext"><$transclude tiddler=[[Tiddler 2]] mode="block"/></div></div>
i.e. without the quotation marks around the

but I did not try your suggestion because I thought the position at the beginning (where I have bla bla) was only meant for text because the bit at the end where you suggest is for the tiddler to be linked to.

Oh well, I learned something again.
Many thanks, Birthe.


4 May 2020, 20:40 by strikke...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Birthe C

unread,
May 5, 2020, 5:35:24 AM5/5/20
to TiddlyWiki
Peter,

If you used Davids New-note-here button, you could edit it to do it automatically, when you create your tiddler.


Birthe

Peter Buyze

unread,
May 5, 2020, 6:19:10 AM5/5/20
to TiddlyWiki forum
Birthe, that's an interesting one. Can you point me to it?


5 May 2020, 12:35 by strikke...@gmail.com:
Peter,

If you used Davids New-note-here button, you could edit it to do it automatically, when you create your tiddler.


Birthe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Tony K

unread,
May 5, 2020, 6:23:56 AM5/5/20
to TiddlyWiki
Peter which template are you using?

if you running Drift then it is included in the package

I am asking because, at one point in time, you showed interest in it


On Tuesday, May 5, 2020 at 7:02:09 AM UTC+3, Peter Buyze wrote:
Yes, that did the trick. Before starting this thread I did try

<div class="tooltip">bla bla<div class="tooltiptext"><$transclude tiddler="[[Tiddler 2]]" mode="block"/></div></div>

and 

<div class="tooltip">bla bla<div class="tooltiptext"><$transclude tiddler=[[Tiddler 2]] mode="block"/></div></div>
i.e. without the quotation marks around the

but I did not try your suggestion because I thought the position at the beginning (where I have bla bla) was only meant for text because the bit at the end where you suggest is for the tiddler to be linked to.

Oh well, I learned something again.
Many thanks, Birthe.


4 May 2020, 20:40 by strikk...@gmail.com:
Peter,

For me it works fine on tiddlyspot, if I have the necessary tiddlers. I do need to write the link though, no link - no backlink.

Why do you expect at tooltip and a transclusion to link to anything?

Try writing:
<div class="tooltip">[[Tiddler 2]]<div class="tooltiptext"><$transclude tiddler="Tiddler 2" mode="block"/></div></div>

Birthe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Peter Buyze

unread,
May 5, 2020, 6:51:52 AM5/5/20
to TiddlyWiki forum
TonyK,

I am not running a template. I David Gifford's TiddlyBlink I use his code

<div class="tooltip">[[bla text|targeted tiddler]]<div class="tooltiptext"><$transclude tiddler="targeted tiddler" mode="block"/></div></div>

I did not show an interest in Drift, I showed an interest in the TWCrossllinks plug-in; the latter does not include a popup tooltip.


5 May 2020, 13:23 by akh...@gmail.com:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Birthe C

unread,
May 5, 2020, 6:54:12 AM5/5/20
to TiddlyWiki
Peter,

It is David's button. Find it here . I just edited it.

tag: $:/tags/ViewToolbar

\define button()
<$button class=<<tv-config-toolbar-class>> actions=<<actions>>tooltip="New tiddler linked to this one">
{{$:/core/images/new-button}}
</$button>
\end

\define actions()
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> text="""<div class="tooltip">[[$(tid)$]]<div class="tooltiptext"><$transclude tiddler="$(tid)$" mode="block"/
></div></div>"""/>
\end

<$wikify name=tid text=<<currentTiddler>>>
<<button>>
</$wikify>
<$list filter="
[<tv-config-toolbar-text>match[yes]]">
<span class="
tc-btn-text">
<$text text="
New tiddler linked to this one"}}/>

caption field:
{{$:/core/images/new-button}} New tiddler linked to this one

description field:
{{$:/language/Buttons/NewJournalHere/Hint}}{{$:/language/Buttons/NewHere/Hint}}


tirsdag den 5. maj 2020 kl. 12.19.10 UTC+2 skrev Peter Buyze:
Birthe, that's an interesting one. Can you point me to it?


5 May 2020, 12:35 by strikk...@gmail.com:
Peter,

If you used Davids New-note-here button, you could edit it to do it automatically, when you create your tiddler.


Birthe


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

David Gifford

unread,
May 5, 2020, 7:21:38 AM5/5/20
to TiddlyWiki
Hi Peter

Sorry I overlooked this question yesterday, I was quite busy with Stroll, and also taking my son to his doctors visit.

The reason you are not getting popus is simple. You do not have in your file the tiddlers I said you would need.

Birthe C

unread,
May 5, 2020, 7:35:50 AM5/5/20
to TiddlyWiki
David,

Exactly!
Putting wiki on tiddlyspot for questioning we need the necessary tiddlers to test.
I had to drag a lot of tiddlers to Peters tiddlyspot to test it.

Peter,
You referring to have it working in a local file does not help anyone trying to test, what could be the reason for your problems.

Birthe

Peter Buyze

unread,
May 5, 2020, 8:33:00 AM5/5/20
to TiddlyWiki forum
Birthe,

1. Regarding David's New-note-here button: I implemented it, many thanks for that.

2. Regarding the tiddlers on my Tiddlyspot: I stated in my original post in this thread, as well as in my answers to Mat, that my issue was NOT the popup tooltip window, but the absence of the backlinks when using David's code for that. The popup tooltip window was working fine in my local file. I did mention that the popups did not work on Tiddlyspot, but that was a BTW-type of info, not the issue I posted for.

Your suggestion 
<div class="tooltip">[[Tiddler 2]]<div class="tooltiptext"><$transclude tiddler="Tiddler 2" mode="block"/></div></div>

solved that issue very well, for which I am grateful. There really was no need to "drag a lot of tiddlers to Peters tiddlyspot to test it" because the solution you offered had no effect on the popup window anyway, so there was no need to get the popup window to work on Tiddlyspot for that.

Your suggestion to put a link in David's YYY position was good to re-establish the backlinks. Like I said above, I thought that position was only for text, not for links. In fact, if one wants/needs to have also text in the YYY position one needs to use the following syntax:

<div class="tooltip">[[bla text|target tiddler title]]<div class="tooltiptext"><$transclude tiddler="target tiddler title" mode="block"/></div></div>

Like I said, I learned something new thanks to your help for which I am grateful.


5 May 2020, 13:54 by strikke...@gmail.com:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Birthe C

unread,
May 5, 2020, 9:06:35 AM5/5/20
to TiddlyWiki
Peter,

You do not get the point. You may not have needed the tiddlers, I did to know what was going on.
I am very bad at guessing, you see.


Birthe

Peter Buyze

unread,
May 5, 2020, 11:22:59 AM5/5/20
to TiddlyWiki forum
I do get the point. I put those tiddlers there to explain my point, and my point was the backlinks, NOT the popups. I don't know how to make that clearer: I stated it in those words a number of times.

I know you cannot, and are not even supposed to guess what I mean. But how else could I have got the message across to you that my only issue was the backlinks? What words should I have used?
I must say I am puzzled by it.


5 May 2020, 16:06 by strikke...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mat

unread,
May 5, 2020, 11:48:18 AM5/5/20
to TiddlyWiki
On Tuesday, May 5, 2020 at 5:22:59 PM UTC+2, Peter Buyze wrote:
I do get the point. I put those tiddlers there to explain my point, and my point was the backlinks, NOT the popups. I don't know how to make that clearer: I stated it in those words a number of times.

The thing, as far as I understand it, is: You say that you do get backlinks to work. But you don't get them to work in popups. Otherwise why do you at all include the popups in your question? Why do you keep referring to this code which IS the popup?

<div class="tooltip">YYY<div class="tooltiptext"><$transclude tiddler="ZZZ" mode="block"/></div></div>

<:-)

Peter Buyze

unread,
May 6, 2020, 1:07:57 AM5/6/20
to TiddlyWiki forum
Mat, with all due respect, you don't seem to have read my comments well.

I did NOT state the backlinks work, I stated the opposite many times ! Neither did I state backlinks did not work in a popup.

What I said about that code is that when it is applied as is, i.e. with just text in the place of YYY of Tiddler 1, then Tiddler 2 does not show the backlink to Tiddler 1 anymore.

Note 1: on his transclusion page David states: YYY with the text to be displayed (called the 'alias').

So, even though the code is there to generate Tid 2's text transcluded in a popup window in Tid 1, just text in place of YYY stops Tid 1's reference being shown in Tid 2.

Note 2: TiddlyBlink shows a references/backlinks section at the bottom of each tid.

However, ............. and that's where Birthe's suggestion showed me the light (<div class="tooltip">[[Tiddler 2]]<div class="tooltiptext"><$transclude tiddler="Tiddler 2" mode="block"/></div></div>), instead of just putting text in position YYY, it is possible to put link syntax in position YYY so that Tid 1's reference to Tid 2 does show up as a backlink in Tid 2, AND Tid 2's transcluded text shows up in a popup window in Tid 1.

The tids that I put up on Tiddlyspot did not have the popup window effect included because I did not have an issue with it. And I stated that unequivocally to both Birthe and yourself, a number of times.

Now, maybe David Gifford's intention with the popup window was never to preserve backlinks too, but, when, as a TiddlyBlink user, I implemented it, I noticed the effect on the backlinks. That is when I asked if there was a way around it. Birthe understood because she came up with the solution.

I don't know how I could have stated more clearly that my issue with David's code was the backlinks and NOT the popup.


5 May 2020, 18:48 by matia...@gmail.com:
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mat

unread,
May 6, 2020, 2:12:25 AM5/6/20
to TiddlyWiki
Yeah, I was/am clearly confused by this.

Birthe understood because she came up with the solution.

Ah, so your question is solved then, great. Then, for your question about how you could phrase it in a more understandable way:

The optimal after it's obvious that we didn't get the question, would be to show "now" vs "expected". "Now" is presumably what you show in your demo and "expected" could perhaps be illustrated like so:


Tiddler 3 and Tiddler 1 - appear same as now but Tiddler 2 should look like:
 
Tiddler 2
just a test
------
Tiddler 3 Tiddler 1

Anyhow, good it was solved.

RIP issue ;-)

<:-)
Reply all
Reply to author
Forward
0 new messages