Internal link macro?

98 views
Skip to first unread message

Elijah A. Brost

unread,
May 12, 2020, 8:27:24 PM5/12/20
to tiddl...@googlegroups.com
Hey guys.

I'm trying to achieve the same internal linking we get with the toc-tabbed-internal-nav (https://tiddlywiki.com/#Example%20Table%20of%20Contents%3A%20Tabbed%20Internal) in other (or all) Tiddlers. Is there a macro that does this, or something similar already?

TonyM

unread,
May 12, 2020, 11:41:22 PM5/12/20
to TiddlyWiki
Elija,

The example you gave depends on the TableOfContents tag and below. Unless you organiss you tiddlers by some means you will simply get a list of them all in the left hand pain, which may be unusably long.

If you installed the kin operator plugin you could have a filter that lists all tiddlers but not those in the TableOfContents Tree. 

It seems to me perhaps you want the internal navigation feature but with the ability to define your own filter, however you need to consider how to define the next level of tiddlers if you want it to have the expandable options.

Tell us more

I will look to see how hard it would be to make an internal viewer where you give the filter or list of tiddlers.

Regards
Tony

Elijah A. Brost

unread,
May 13, 2020, 12:04:15 AM5/13/20
to tiddl...@googlegroups.com
The macro toc-tabbed-internal-nav spawns two panes. The left, which persistently contains a Table of Contents, and the right which contains the selected Tiddler. I don't need the TOC. So what I was thinking, is that I'd just have the right-side pane. Essentially, just a Tiddler, but the links in which open the new Tiddler in the place of the old. Now that I've thought about it a bit more though, I think there's got to be another, more elegant way of doing this.

What I'm really looking to do, and the above was just one way I could see figuring out how to do it, is to always work only with one Tiddler open. I don't have any use for the Story River (nor even the Sidebar). With links I can navigate to every page I need. With transclusion I can create new Tiddlers; search, save, and refresh my wiki; access everything I need. The TiddlyWiki internals are great. But for the front-end I really only need one Tiddler displaying at a time, taking up the entirety of the page. None of the other clutter.

On Tuesday, 12 May 2020 21:41:22 UTC-6, TonyM wrote:
Elijah,

TonyM

unread,
May 13, 2020, 1:54:20 AM5/13/20
to TiddlyWiki
Elijah

I have all but finished  to make an internal viewer where you give the filter or list of tiddlers.

That is fine for you do do what every you want, however unless you are aware of all the options available to you, I would not jump to a personal position. Heres some notes;
  • The Zoomin Story view keeps one tiddler open at a time
  • Others have made single tiddler views
  • wikilabs link-to-tabs plugin puts tabs of all open tiddlers at the top, so you can always view any open tiddler with a click
Tiddlywiki has so many possibilities and people working with it there are opportunities to use prior work for almost anything.

Regards
Tony

Elijah A. Brost

unread,
May 13, 2020, 10:45:12 AM5/13/20
to tiddl...@googlegroups.com
Hey Tony.

The Zoomin view appears on first glance to do what I am looking for, however it is not. With every opening of a new Tiddler, the old Tiddler does not close - but stays open in the background - as can be seen by having the Sidebar open to the Open tab. (I'm worried about performance degrading substantially after only a few minutes of work, and constantly having to click 'Close All', and then find where I was again, again and again)

I was looking @ https://groups.google.com/d/msg/tiddlywiki/zRKIB8bG75Q/F8HV7lcvBAAJ, which demos a single-Tiddler view, and can slightly modify some code provided in that thread to get a template for transclusion that essentially does what I am looking for:

<$button class="tc-btn-invisible tc-tiddlylink">
<$action-setfield $tiddler="$:/StoryList" list="" />

<$action-navigate />
<$action-setfield $tiddler="$:/FooterTiddler" opentag="" />
<div class="box">
{{!!title}}
</div>
</$button>

However, this isn't perfect either. For one, it will only work for links in which I name the Tiddler exactly, as you would with [[Tiddler Title]], but not when I want to have the link display something else, as you would with [[displayed text|Tiddler Title]]. Of course I could just write a second template for such cases. A greater problem would be that if I ever want to go back from this little experiment of mine, I would have to go through and change every single one of these custom links ( {{Tiddler Title||customLink}} ) back into an ordinary WikiText link ( [[Tiddler Title]] ). That'd be a real hassle. I'm hoping rather that I may be able to change what happens when a WikiText link is clicked, so that it does the above.

Mat

unread,
May 13, 2020, 11:05:05 AM5/13/20
to TiddlyWiki
Elijah A. Brost wrote:
The Zoomin view appears on first glance to do what I am looking for, however it is not. With every opening of a new Tiddler, the old Tiddler does not close - but stays open in the background - as can be seen by having the Sidebar open to the Open tab.

I invite you to the dev discussion on this: https://github.com/Jermolene/TiddlyWiki5/pull/3412

If I understand right, it is pretty close to solved so some constructive participation could push it over the edge.

 <:-)

TonyM

unread,
May 13, 2020, 5:47:22 PM5/13/20
to TiddlyWiki
Elijah,

It is my experience that such concerns as "old Tiddler does not close - but stays open in the background" is unwarranted. Why?, typically the whole wiki is in memory all the time, it is the complexity of what you are looking at that has the most impact or the total size of the wiki. If you hide the side bar or a tab with a large list in it the performance improves. I can help you with other performance improvements as well.

In short I respectfully suggest you are trying to solve a problem that does not exist.

Mats link to single tiddler view is not about performance it is about visibility and functionality.

Regards
Tony

Mat

unread,
May 13, 2020, 6:02:12 PM5/13/20
to TiddlyWiki
TonyM wrote:
Mats link to single tiddler view is not about performance it is about visibility and functionality.

You sure? I have always assumed that if zoomin view really was single tiddler, then that means all other tiddlers really are not active - hence performance. Do I misunderstand?

<:-)

Elijah A. Brost

unread,
May 13, 2020, 6:18:55 PM5/13/20
to TiddlyWiki
Hey Tony,

I didn't know about the Zoomin view before this morning. Have since done some testing (though not extremely thorough), and it seems to be fine performance wise.

Thanks guys.

TonyM

unread,
May 13, 2020, 8:42:30 PM5/13/20
to TiddlyWiki
Mat,

As I understand it, If the zoomin view is hiding the other open tiddlers, rather than not displaying them at all, perhaps it could have a little impact, I do not know) but even then Tiddlywiki displays what it is asked to and applies a change when it occurs, including say when "opening a tiddler it's added to the story list". Its genius is that that it then uses a mechanism to update any elements which have being impacted by the changes such as updating the open tiddlers list, other than saving changes to tiddlers ion memory the only impact is on what is visible. If the side bar was not there the open tiddler list is not touched, in someways it does not exist unless visible. This is why hiding the side bar can improve performance in large wikis (I am not sure if simply closing it helps), I take the $:/tags/SideBarSegment tag off $:/core/ui/SideBarSegments/tabs, just closing a lot of visible tiddlers in the story can also help.

I understand it is the way the "widget tree" is used to identify the children and update them, but more important is perhaps to remember until you save the wiki back, everything is happening in computer/browser memory including the recent list caches and more for fast searches. So unless your browser is paging the file, render time and memory access speed should be the main performance variants.

People with more expertise can confirm or deny this, but I am quite confident on this.

regards
Tony
Reply all
Reply to author
Forward
0 new messages