list-first and list-after ??

72 views
Skip to first unread message

Steven Schneider

unread,
May 26, 2017, 3:25:53 PM5/26/17
to TiddlyWiki
Hi folks, has there ever been discussion of implementing a list-first and list-after option that would work similarly to list-before and list-after, except force to the beginning / end of the list?

My specific use case: I've created a macro that changes the theme to punch (for a slide show), and then lists all tiddlers filtered on a tag. I'd like the last slide to have a button that invokes a macro changing the theme back to its initial value to allow a return to "normal" wiki view. I'd like that tiddler to be the last tiddler (slide) viewed. Not sure how else to force it to the bottom of the list other than by naming it zzzSlide or something equally unattractive...

//steve.

Thomas Elmiger

unread,
May 26, 2017, 4:10:13 PM5/26/17
to TiddlyWiki
Hi Steve,

I think this would provoke conflicts as soon as there are two tiddlers with the same value (list-first/list-last) in the same list.

Good luck and good night!
Thomas

Mat

unread,
May 27, 2017, 5:15:25 PM5/27/17
to TiddlyWiki
Steven Schneider wrote:
Hi folks, has there ever been discussion of implementing a list-first and list-after option that would work similarly to list-before and list-after, except force to the beginning / end of the list?

I made this proposal a year ago. Give it a thumbs up or a comment if you agree with it.


My specific use case: I've created a macro that changes the theme to punch (for a slide show), and then lists all tiddlers filtered on a tag. I'd like the last slide to have a button that invokes a macro changing the theme back to its initial value to allow a return to "normal" wiki view. I'd like that tiddler to be the last tiddler (slide) viewed. Not sure how else to force it to the bottom of the list other than by naming it zzzSlide or something equally unattractive...

Do I understand it right that the problem for you is to ensure that a certain tiddler is the last one listed? You can control the order of a list by using the sort operator and you can sort based on a variety of aspects, e.g a field value.

But, to sensure a specific tiddler comes last you can simply do this:

[tag[foo]] -[[specialtiddler]] [[specialtiddler]]

...i.e you remove that specialtiddler from wherever-it-appears in the list-by-tag and then append it last to the result.

<:-)

//steve.

Reply all
Reply to author
Forward
0 new messages