[TW5] Cycle a Tag with the new ActionListops widget

128 views
Skip to first unread message

Matabele

unread,
Jan 14, 2016, 12:55:00 AM1/14/16
to tiddl...@googlegroups.com
Hi

Cycling a tag appears to be a common requirement. I have explored various methods, and settled on this as the simplest and most versatile solution.

1. Copy the attached global macro across to your wiki
2. In each tiddler you wish to cycle a tag
   (a) Insert the button macro <<cycleTags>>
   (b) Create the 'list' field, and enter the list of tags you wish to cycle through for that tiddler
3. Click away!

regards
Cycle Tag Macro.tid

Alex Hough

unread,
Jan 14, 2016, 1:12:40 AM1/14/16
to tiddl...@googlegroups.com
It would make a good example of listOps on TiddlyWiki.com


Alex
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/64a248a9-edfb-4c7c-9a3c-b1a86e33e7b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matabele

unread,
Jan 14, 2016, 1:24:57 AM1/14/16
to TiddlyWiki
Hi Alex

Not sure where and how to add this, as it depends on both the macro, macro call, and the contents of the 'list' field. Difficult to describe within the constraints of widget examples. 

Would be easier if this macro were included as a demonstration macro on tw5.com -- then described in terms of a macro (that uses the ActionListops widget.)

We'll see how other users get on with this, and if the macro needs changing before I submit anything to tw5.com. I'm also busy developing a cycle[] filter operator, which promises to offer more versatility.

regards

Alex Hough

unread,
Jan 14, 2016, 6:06:08 AM1/14/16
to TiddlyWiki
Matabele,

I think selection of tags by cycling will be very useful. It could make grouping tags easier too.

Alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

William Jackson

unread,
Jan 14, 2016, 6:12:25 AM1/14/16
to tiddl...@googlegroups.com
Hi Alex

At the moment, the macro can only cycle tags from a single list/tiddler (the ‘list’ field.) It is this limitation that I am trying to address with a new filter operator.

There is a workaround which uses two ActionListops widgets per cycled tag (one to rotate the list and one to set the tag). This would allow for several tags/tiddler — but I’m trying to make things easier :-)

regards,

William Jackson
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/REYiQmLf-R4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Alex Hough

unread,
Jan 14, 2016, 7:04:30 AM1/14/16
to TiddlyWiki
William,

Sometimes i think it's good to leave it simple. I can understand what you've done, if the ideas was further refined I might not have been exposed to the thinking behind the solution

Alex

Matabele

unread,
Jan 17, 2016, 1:36:11 PM1/17/16
to TiddlyWiki
Hi

In order to remove the limitations of the method outlined in my original post, I have written two new filter operators:
-- the cycle[] operator, used in combination with the ActionListops widget, may be used to cycle a 'tag' in any field/index, from a reference list of options
-- the keep[] operator, used in combination with a List widget, may be used to display the currently selected option, from a reference list of options

I have posted documentation and demos for the pair of filter operators here.

regards

Alex Hough

unread,
Jan 17, 2016, 1:53:35 PM1/17/16
to TiddlyWiki
Matabele,

how do I import the operators?

Alex

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Matabele

unread,
Jan 17, 2016, 3:01:00 PM1/17/16
to tiddl...@googlegroups.com
Hi Alex

Go to the More/System tab in the sidebar, and copy the tiddler $:/core/modules/filters/x-listops.js across to your wiki -- then save and refresh.

This will overwrite the shadow tiddler of the same name, thus adding the two new filter operators.

regards

Matabele

unread,
Jan 20, 2016, 10:38:57 AM1/20/16
to TiddlyWiki
Hi

I have updated the demo of the cycle[] and keep[] filter operators -- the demo is now in the form of a slideshow, which may be of interest.

To get this working:
-- you will need the the newer version of the 'x-listops' filters: $:/core/modules/filters/x-listops.js
-- and the plugin: $:/plugins/matabele/slideshow (not yet packaged)
-- create a new tiddler as a container
-- add the macro call <<storyBar>>
-- add a 'filter' field containing a filter expression defining the tiddlers to include in your slideshow (can be a simple list of tiddlers)
-- clicking one or other of the chevrons will initialise the state variable
-- thereafter, the show should work as expected

regards
Reply all
Reply to author
Forward
0 new messages