Link same as title

125 views
Skip to first unread message

Vincent vd B

unread,
Jun 5, 2019, 5:12:39 AM6/5/19
to TiddlyWikiDev
Hello,

In a transcluded tiddler I want to place a link to the tiddler itself. 
So: tiddler B is loaded in tiddler A. 
In tiddler B there is a link to tiddler B.

[[{{!! title}}]] is not working.

I use the snippet function and want to avoid having to type in links for 1500 pages.

I hope I have explained it clearly.

Thanks,

TonyM

unread,
Jun 5, 2019, 5:33:19 AM6/5/19
to TiddlyWikiDev
Vincent,

Can I respectfully ask why you want this because this could change how I answer. If as I suspect you want a link to the original tiddler when its displayed in side another tiddler?

Tony

PMario

unread,
Jun 5, 2019, 7:29:30 AM6/5/19
to TiddlyWikiDev
Hi Vincent,

How do you transclude tiddler B into tiddler A? ... wikitext?

You could use eg: <$link to={{!!title}}><<currentTiddler>></$link> in each tiddler.

BUT you should store this info as a macro. So you can change it globally if needed. Otherwise you'd need to change 1500 tiddlers.

Download the attachment and drag it to your wiki. So you can test the suggestion, if I did understand your request in the right way.

have fun!
mario
Xlink-test.json

Vincent vd B

unread,
Jun 5, 2019, 9:27:02 AM6/5/19
to tiddly...@googlegroups.com
Hello,

TonyM:
Yes, I want a link to the original tiddler when it is displayed in another tiddler. 
So when I hit that link, I can easily edit that tiddler and save. 

PMario:
I use the "details macro" (Shiraz plugin). 
I want to place a link in the bar that refers to the original tiddler.
Sorry, the code you gave me works but not in this code.
It makes a mess of the layout.


CODE.png

CODE2.png

CODE3.png




Op woensdag 5 juni 2019 11:33:19 UTC+2 schreef TonyM:

TonyM

unread,
Jun 5, 2019, 7:52:54 PM6/5/19
to TiddlyWikiDev
Vincent,

Ok, Now for some time when I have a tiddler I may want to access from other places I include [[edit|thetiddlername]] or [[⛯|thetiddlername]] in that tiddler because unless it is literal currentTiddler may not be the appropriate value.

However in your case I understand you have thousands and you do not want to code it in each tiddler. What I suggest is in a view template tiddler, or in the listing process you generate the link when the current tiddler is set to the tiddler for which you want a link. Here are a few useful examples;

<$list filter="filter of transcluded tiddlers">
<$transclude tiddler=<
<currentTiddler>>/>
with
<$link to={{!!title}}><
<currentTiddler>></$link>

or
<$link to={{!!title}}>⛯</$link>

or

{{||$:/core/ui/Buttons/edit}} to go direct to edit (or any other button designed for currentTiddler)

</$list>


If there is only one tiddler ie: "no filter of transcluded tiddlers" you can set currentTiddler with
<$tiddler tiddler=<<variable>> >here</$tiddler>
<$tiddler tiddler={{state tiddler}}>here</$tiddler>/>
<$tiddler tiddler={{!!fieldname}}>here</$tiddler>/>

etc..

Place the link you want that uses currentTiddler at "here".

Regards
Tony

Vincent vd B

unread,
Jun 6, 2019, 12:49:48 PM6/6/19
to tiddly...@googlegroups.com
Dear TonyM, thanks for answering but I cannot fully follow you here.

I currently have a significant number of tiddlers in my wiki, and a significant number will be added in the future. I am inexperienced with coding and learn on the go. As a result, I have had to re-edit a whole bunch of tiddlers several times. Maybe I should look for someone who looks at what I need and can advise me on what is best. (I am increasingly suspected that there is room for improvement, but I have no idea what is best.)

Not only do I have to get through to the essence of the information that I process in my wiki, I also have to design my wiki as efficiently as possible. The latter is a bit much of the good at the moment. ;)

In any case, the information in my wiki is of such a nature that it is fairly easy to process because there is a logic behind it.

Simplifying and automating will primarily save me a lot of work, make my wiki lighter, and give me more control over the whole.

Maybe I should look for someone who can help me and give me advice.


Op donderdag 6 juni 2019 01:52:54 UTC+2 schreef TonyM:

TonyM

unread,
Jun 6, 2019, 8:42:44 PM6/6/19
to TiddlyWikiDev
Vincent,

Lets keep this simple for now.

In the tiddler that lists the other tiddlers how do you make the other tiddlers appear?
Can you show me your link or transclude to tiddlers process?
and/Or what is your snippet function doing?

Regards
Tony

Vincent vd B

unread,
Jun 8, 2019, 6:48:35 AM6/8/19
to tiddly...@googlegroups.com
TonyM,

I study and enter all the information I find in my wiki. It is not easy to place all information in a clear, well-arranged and hierarchical manner.

First I have to get all the information clear for myself.
Divide all information into small pieces. And place them one after the other so that a clear legible story is created. Place these pieces of information in a hierarchy. And make them appear in the right places. And in such a way that I make all the interconnections between the pieces of information visible. The information I process lends itself well to this, but I am inexperienced in working this way and writing code. I have come a long way, but unfortunately it still happens regularly that I see that there is room for improvement and that I then have to adjust many tiddlers manually.

I need someone who can shed some light on this.

Regarding your question:

Tiddler A:
CODE:

<$list filter="[tag<currentTiddler>]">
{{!!text}}
</$list>

Tiddler B:  (Transcluded in A)
Title: (A) Descriptive title
Tag: A
CODE:

<<details sum:"[[(A) Descriptive title]]"  (NOTE: I have to fill in the link here manually, but it is the same as the title.)
"
TIDDLER TEXT
"class:"alert-primary">>

I hope I have been able to make it clear.
Thanks


Op vrijdag 7 juni 2019 02:42:44 UTC+2 schreef TonyM:

TonyM

unread,
Jun 8, 2019, 8:05:21 AM6/8/19
to TiddlyWikiDev
Vincent

I will give this more time tomorrow.

However can you show me how you tranclude tiddler b in tiddler a? In the code you only list the the titles of tiddlers tagged with tiddler a.

I assume because you are using the editor toolbar excise function that it reads like this in tiddler a

{{tiddler b}}

Please correct me if I am wrong. I think I have all the answers you need I just need to be sure of the question. What are you starting from.

Regards
Tony

Vincent vd B

unread,
Jun 8, 2019, 12:30:14 PM6/8/19
to TiddlyWikiDev
I think I explain it more complicated than necessary. Tiddler B is transcluded into A. To be able to edit tiddler B, I want a link in the text so that I can open and edit tiddler B with one click. (See [[(A) Descriptive title]] in the code which I now enter manually.) Also when I create a new page I use the snippet function. The less text I have to adjust, the better.

The code you gave me works but I can't use it because it confuses the layout.

TITLE OF TIDDLER B = (A) Descriptive title
TIDDLER B TEXT =

<< details sum: "[[((A) Descriptive title]]"
"
TEXT TEXT TEXT
"class:" alert-primary ">>

Op zaterdag 8 juni 2019 14:05:21 UTC+2 schreef TonyM:

TonyM

unread,
Jun 8, 2019, 11:55:56 PM6/8/19
to TiddlyWikiDev
Vincent,

This is quite common but you have not actually described the root cause or requirement. You have shown me a partial solution which you have a problem making work. 

As a result to answer your question I have to guess your situation, and give you a fuller answer, and may still be off target. 

I will do this right now. I thought I would let you know first.

This is my assumption
You may first have a tiddler like this

tiddlera

What is Lorem Ipsum?

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
 
Why do we use it?

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using '
Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

 
Where does it come from?

Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.



Then you edit the tiddlera and select the the following
What is Lorem Ipsum?

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

Then you use excise in the toolbar editor buttons
  • And Create Tiddlerb with it tagged tiddlera, and leaving a transclusion behind {{tiddlerb}}
  • You then do this with the other paragraphs tiddlerc and tiddlerd
Now tiddlera looks as if it still contains all three paragraphs but it actually contains
{{tiddlera}}

{{tiddlerb}}

{{tiddlerc}}

Though What I do is;
  • ctrl-t the heading, to cut it and place in clipboard 
  • highlight the paragraph
  • hit excise button (check - Tag new tiddler with the title of this tiddler)
  • ctrl-v in the "Title of New Tiddler" this will past the heading as the tiddler title - your "Descriptive title"
  • Perform Excision
So the tiddlera contains

{{What is Lorem Ipsum?}}

{{Why do we use it?}}

{{Where does it come from?}}

Tag new tiddler with the title of this tiddlerTag new tiddler with the title of this tiddlerTag new tiddler with the title of this tiddlerTag new tiddler with the title of this tiddler)

However my guess is when looking at tiddlera you would like to be able hide the content behind a details tag and present a button when clicked that lets you edit the tiddler related to that paragraph.

So if this is the case I suggest you do the following in tiddlera after cutting out the paragraphs.

<$list filter="[all[current]tagging[]]">

</$list>
This will list all tiddlers tagged with the current tiddler, in this case tiddlera

Now inside the list the currentTiddler variable will change for each tiddler found in the filter.

So let us first transclude these other tiddlers to they appear to be part of tiddlera, it transcludes current tiddler in the form used below

<$list filter="[all[current]tagging[]]">
 <$transclude/>
<br><br>
</$list>

But you want the titles from the tiddler to be used. You could use 
<h3>{{!!title}}</h3>

But let us also create a link to the subtiddler with the heading
<$list filter="[all[current]tagging[]]">
 <$link to=<<currentTiddler>> tooltip="Open subtiddler to view or edit"><h3><<currentTiddler>></h3></$link>
 <$transclude/>
</$list>
This may be already all you need
Note if your subtiddlers contain CamleCase in their title you may need to do this to the above heading.
<h3><$text text=<<currentTiddler>>/> </h3>

What if you want a button to be able to edit each "sub tiddler" directly if required", I have placed it inside the heading below.

<$list filter="[all[current]tagging[]]">
 <$link to=<<currentTiddler>> tooltip="Open subtiddler to view or edit"><h3><<currentTiddler>>  {{||$:/core/ui/Buttons/edit}}</h3></$link>
 <$transclude/>
</$list>
This will provide a button that if clicked will edit the named tiddler.

Note for above
  • All normal tiddler buttons actually operate on the current tiddler so we can locate the button for edit  $:/core/ui/Buttons/edit
  • And transclude it along with the tiddler content, 

  • notice the "||" inside the button transclusion, to ensure it operates on the currentTiddler


Now I also understand you want the tiddlers to be in a details tag here I use the html details tag. 
Important: the blank lines are needed here, and I will use the summary for the title

<$list filter="[all[current]tagging[]]">

<details><summary><$text text=<<currentTiddler>>/></summary>


 <$transclude/>

{{||$:/core/ui/Buttons/edit}}
</details>
</$list>
You click on the title and see the content, you may wish to style this to make it more noticable.

Want more tricks? Just ask here

- Like a tiddlera internal toc?
- Move the above code into the view template so it works on any tiddler with sub-tiddlers by tag, and you do not even need to place the above code in any tiddler?
- An internal TOC that lets you change the order of the paragraphs in tiddlera
- A Tagpill to change the paragraph order?
- Hide or display the edit button

Tell me if you need something other than the above?


Regards
Tony

Vincent vd B

unread,
Jun 9, 2019, 3:19:49 AM6/9/19
to tiddly...@googlegroups.com
TonyM,

I can do something with that. I can use that code at other places in my wiki. Unfortunately I do not know how I can generate the link in the code without problems..

The bars that I can open and which contain the link saves me a lot of space in the page. The beams are also close together. I do not want to deviate from that.

But I have no idea how to process this code in the existing code without destroying its layout.

By the way: I like the edit button, but it is widening the bars wich take up space. The less space the bars occupy, the better. With the bars I can transclude pieces 
of information without affecting the legibility of the text in that page.

I made mp4. You can download it here:




Op zondag 9 juni 2019 05:55:56 UTC+2 schreef TonyM:
Reply all
Reply to author
Forward
0 new messages