Next/Prev in Tag Set button?

83 views
Skip to first unread message

TonyM

unread,
May 2, 2020, 9:42:17 PM5/2/20
to TiddlyWiki
Folks,

In support of the release of Stroll and for General use, I was wondering if anyone has made a 

Next /Prev in "Tag Set" button?

  • Tabs (using tags) and Tags can have an order, 
  • a button that, given such a tag name, could take the current tiddler and jump to the next or previous in the list 
  • I can make this myself, but was wondering if its being done before?
  • Ideally it could also set a state tiddler as well such as that used in the tabs macro, so you can navigate to the next tab rather than navigate to.
  • I know slideshows and other implementations will use this but I am interested in a standalone feature.
  • An advanced feature would be to generate a number for the position of that item in the list.
If you now how to do this or prior work please share. If you think it a good idea please share, and if it inspires another idea please share.

Regards
Tony

PMario

unread,
May 3, 2020, 4:23:22 AM5/3/20
to TiddlyWiki
On Sunday, May 3, 2020 at 3:42:17 AM UTC+2, TonyM wrote:
In support of the release of Stroll and for General use, I was wondering if anyone has made a 
Next /Prev in "Tag Set" button?

What is a "Tag Set" button?
-m

TonyM

unread,
May 3, 2020, 5:32:24 AM5/3/20
to TiddlyWiki
Mario

By tag set I mean the set of tiddlers so tagged.

I have already done 90% of a solution, I am just trying to make it as easy to use and flexible as possible.

There are a few possibilities that have opened up over the last few releases with order operators etc...

I would still like to trigger the creation of the list field or manual order without needing a drag and drop on the tag pill.

Regards
Tony

Mat

unread,
May 3, 2020, 6:09:46 AM5/3/20
to TiddlyWiki
Yeah, this reminds me of the Previous/Next button in http://pptw.tiddlyspot.com/
Maybe a better solution is to use Extended Listops Filters. Depends on if you want the control in a central list or, as in pptw, in the listed items.

<:-)

Birthe C

unread,
May 3, 2020, 6:23:27 AM5/3/20
to TiddlyWiki
TonyM,

Most of the slideshow versions use something like that. You could also look at Mohammads,
https://kookma.github.io/TW-TOC/ The navigation tiddlers.

You wrote about the wish for buttons like that for Stroll. Sure but are you sure the wish is for tag navigation. The tiddlers are navigated through links mostly, The tiddlers does not necessarily have any tags in common.
That button is also possible, but that would be navigating the history...and Stroll is using two stories and two histories.

Birthe

TonyM

unread,
May 3, 2020, 6:30:45 AM5/3/20
to TiddlyWiki
Mat/Birthe,

Here is a tiddler with my work in progress, self contained, works on tiddlywiki.com

In this example you can see it operates by default on the children of the currentTiddler (by tag) however you can provide a filter.

I am trying to build a universal basic solution.

`
\define first-tiddler(filter:"[tag<currentTiddler>]") {{{ $filter$ +[first[]] }}}
\define last-tiddler(filter:"[tag<currentTiddler>]") {{{ $filter$ +[last[]] }}}
\define next-tiddler(filter:"[tag<currentTiddler>]") {{{ $filter$ +[after[]] }}}
\define prev-tiddler(filter:"[tag<currentTiddler>]") {{{ $filter$ +[before[]] }}}
\define goto-first-button(variable-name label:"open" icon:"$:/core/images/preview-open" class:"""tc-btn-invisible""")
<$wikify name=result text="<<$variable-name$>>">
<$button class="$class$"><$action-navigate $to=<<result>>/><$transclude tiddler="$icon$"/>$label$</$button>
</$wikify>
\end
\define goto-variable-button(variable-name label:"open" icon:"$:/core/images/preview-open" class:"""tc-btn-invisible""")
<$wikify name=result text="<<$variable-name$>>">
<$button class="$class$"><$action-navigate $to=<<result>>/><$transclude tiddler="$icon$"/>$label$</$button>
</$wikify>
\end
<$tiddler tiddler="Features">
currentTiddler=<<currentTiddler>><br>
<hr>
first-tiddler: <<first-tiddler>> <<goto-variable-button first-tiddler>><br> 
last-tiddler: <<last-tiddler>> <<goto-variable-button last-tiddler>><br>
<hr>
<$set name=first-tiddler value={{{ [tag[TableOfContents]] +[first[]] }}}>
<$set name=last-tiddler value={{{ [tag[TableOfContents]] +[last[]] }}}>
<$set name=next-tiddler value={{{ [tag[TableOfContents]after<currentTiddler>] }}}>
<$set name=prev-tiddler value={{{ [tag[TableOfContents]before<currentTiddler>] }}}>
tiddler-count=<<tiddler-count>> first-tiddler=<<first-tiddler>> currentTiddler=<<currentTiddler>> last-tiddler=<<last-tiddler>><br>next-tiddler=<<next-tiddler>>,  prev-tiddler=<<prev-tiddler>>
<$list filter="[tag[TableOfContents]]">

</$list>
</$set></$set></$set></$set>
<hr>
</$tiddler>
`

Tony

Diego Mesa

unread,
May 3, 2020, 9:13:03 AM5/3/20
to TiddlyWiki
Hey Tony,

I dont know if this is what you are looking for :

TonyM

unread,
May 3, 2020, 6:18:50 PM5/3/20
to TiddlyWiki
Diego,

Actually that looks very powerful, although I imagine there are new methods available from recent tiddlywiki versions. I expect to harvest some of your coding ideas from there.

I am however trying to make something far easier to use but perhaps with less features and dynamic in response.

If I have it correctly your tool will capture the order in fields of the related tiddler, this is a useful method in particular cases. 

Thanks for sharing.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages