Link to Next Tiddler in Alphabetical Order

Hello! Is there a way to make a link to the next tiddler in alphabetical order?

I have a number of tiddlers with a certain tag. I would live to input a widget that automatically takes you to the next tiddler in alphabetical order. I am hoping this will help facilitate the use of tiddlywiki as part of a presentation.

I imagine the list widget can help, but I am woeful at the more advanced parts of Tiddlywiki…

Any help is appreciated!!!

Yes, the standard approach is to use a list widget and Filter such as [all[]tag[yourtag]sort[]] the all is default and can be left out.

I have a special alternative to tag pills, filter pills that can do this, or an addon to provide next and previous on the tag pill drop down. I will look for them if you ask.

Wouldn’t that generate a list of all the tiddlers with “yourtag”, as opposed to just the next one in alphabetical order?

Yes, but it is the input to such a mechanism. You may then enhance the filter to list the tiddler after or before the current tiddler. There are filter operators for this very function.

This is where I struggle with TiddlyWiki. I see there is a “next” operator, but I can’t seem to use it with the list widget and the filter expression.

I’m trying to get this done without asking for help, but I struggle. I do appreciate you pointing me in the right direction.

No Problem. So you can help yourself try searching for “next previous” here . eg install the next-tagged.json by dropping it on your wiki or tiddlywiki.com then click on any tag pill.

If you need something else either keep searching, ask here or consider looking closer at the $:/PSaT/next-tagged tiddler to see how I did it.

Give this a try:

First, create a separate tiddler (e.g., “Goto”), tagged with $:/tags/ViewTemplate, containing:

\define mytag() YourTag
<$list filter="[<currentTiddler>tag<mytag>]">
@@float:left;<$list filter="[tag<mytag>sort[]before<currentTiddler>]">previous: <$link/></$list>@@
@@float:right;<$list filter="[tag<mytag>sort[]after<currentTiddler>]">next: <$link/></$list>@@

Notes:

  • $:/tags/ViewTemplate shows the “Goto” tiddler content at the bottom of each tiddler display
  • \define mytag() YourTag is just a convenience variable so you can easily change the tag value for which the “Goto” tiddler will be applied
  • <$list filter="[<currentTiddler>tag<mytag>]"> restricts the output to only those tiddlers that are tagged with the specified tag value
  • The remaining two lines use $list widgets to get the titles of the tiddlers occurring before and after the current tiddler, and then output links to those tiddlers positioned along the left and right sides of the tiddler.

Let me know how it goes…

enjoy,
-e

2 Likes

You can also see a plugin I wrote for a very similar purpose:

https://crosseye.github.io/TW5-WizardNav/

1 Like