Hi Andrew
OK -- tested this in a TW now :-) Place this code in a tiddler, and place
the list of tags in the list field (of the same tiddler.)
<ul>
<$list filter="[tag[ToReview]]">
<li>
<$link><<currentTiddler>> </$link></li>
<$button class="tc-btn-invisible" tooltip="cycle period">
<$action-listops $tags="+[cycle{!!list}]"/>
@ <$list filter="[is[current]tags[]] +[keep{!!list}]" variable="item"><
<item>></$list>
</$button>
</$list>
</ul>
regards
On Tuesday, 2 February 2016 18:20:05 UTC+2, Andrew Whiting wrote:
>
> Hi Matabele
>
> Okay, I'll see if I can make that work. It's not displaying a button for
> some reason but I'm really new at this so I'll keep working on it.
>
> Thanks so much for your time and help!
>
> Andrew
>
> On Tuesday, February 2, 2016 at 5:04:03 PM UTC+1, Matabele wrote:
>>
>> Hi Andrew
>>
>> In the demo, each of the 'tag buttons' is cycling a different tag on a
>> different tiddler. For your usage case, you'd need only a single 'tag
>> button':
>>
>> <ul><$list filter="[tag[ToReview]]">
>> <li>
>> <$link><<currentTiddler>> </$link><$button class="tc-btn-invisible"
>> tooltip="cycle period">
>> <$action-listops $tags="+[cycle[Review1 Review2 Review3 Review4]"/>
>> @<$list filter="[is[current]tags[]] +[keep[Review1 Review2 Review3
>> Review4]]" variable="item">
>>
>> <<item>>
>> </$list>
>> </$button>
>>
>> </li>
>>
>> </ul>
>>
>>
>> The top filter lists all of the tiddlers tagged 'ToReview' -- and the
>> <$link><<cuurentTiddler>></$link> displays the title of the tiddler as a
>> link.
>>
>> The button alongside will cycle through your four tags for that tiddler.
>>
>> Bare in mind, that when specified like this, the list of tags can not
>> contain spaces. If any of your tags contain spaces, you must use a
>> reference to a list in a field or variable (as in the example.)
>>
>> regards
>>
>> On Tuesday, 2 February 2016 17:53:29 UTC+2, Andrew Whiting wrote:
>>>
>>> The problem is that I have multiple titles in my list (I attached a pic)
>>> so I was hoping not to end up with a bunch of buttons.
>>>
>>> If I understand correctly, the state of the checkbox would reflect the
>>> presence of a "Review" (or some iteration of it) tag. By clicking it, I
>>> would remove "Review" and add "Review 2." This would both remove that title
>>> from my list and get it ready to pop up on my list again after x days
>>> because I would be pulling in anything tagged Review that's 3 days old,
>>> anything tagged Review 2 that's a week old, anything tagged Review 3 that's
>>> 2 weeks old on so on.
>>>
>>> If you tell me it won't work I'll believe you and build the button. I
>>> just hoping your cycle filter would be a pretty solution to my problem.
>>>
>>> Thanks!
>>>
>>> On Tuesday, February 2, 2016 at 4:36:47 PM UTC+1, Matabele wrote:
>>>>
>>>> Hi Andrew
>>>>
>>>> The state of a checkbox (checked/unchecked) is tied to the
>>>> presence/absence of an item in a list. When cycling a tag, therefore, what
>>>> should the state of the checkbox reflect?
>>>>
>>>> Rather build a button which cycles the tag on each click -- the current
>>>> state can be displayed (on the button, if you wish) with the keep[]
>>>> operator (designed specifically for this purpose.)
>>>>
>>>> There's an example of this on the demo website here
>>>> <http://listops.tiddlyspot.com/> -- flip through the slides to keep[]
>>>> Operator (Examples), and repeatedly click any of the tags at the bottom of
>>>> the page. This should be something like what you're after.
>>>>
>>>> You'll need the version of the x-listops.js filters from the demo site
>>>> (which includes the cycle[] and keep[] operators) -- then adapt the code
>>>> from the aforementioned example.
>>>>
>>>> regards
>>>>
>>>> On Tuesday, 2 February 2016 17:24:06 UTC+2, Andrew Whiting wrote:
>>>>>
>>>>> Hi Matabele,
>>>>>
>>>>> I stumbled across this thread and was wondering if there is a way to
>>>>> combine your cycle [] filter operator with a checkbox so that checking
>>>>> the
>>>>> box removes one tag and adds the next in the cycle? I'm new to TIddlyWiki
>>>>> and am not in any way a programmer so hopefully that's not a dumb
>>>>> question...
>>>>>
>>>>> For some added context, I'm pulling in a linked list of the titles of
>>>>> all tiddlers tagged "Review" that were created 2, 7, 14, 28 etc days ago
>>>>> (as a way of systematically reviewing class notes). I would like to use
>>>>> your cycle filter operator to make it so that checking the box next to
>>>>> the
>>>>> title removes "Review" and adds "Review 2" (or removes "Review 2" and
>>>>> adds
>>>>> "Review 3" and so on) to bump the tiddler into the next group with a
>>>>> longer
>>>>> waiting period.
>>>>>
>>>>> I've been at it for hours and am stumped haha.
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>>
>>>>>
>>>>> On Friday, January 15, 2016 at 10:45:56 AM UTC+1, Matabele wrote:
>>>>>>
>>>>>> Hi Casey
>>>>>>
>>>>>> You might like to have a look at my new cycle[] filter operator from
>>>>>> here <http://listops.tiddlyspot.com/>. If you like this solution,
>>>>>> copy across the modified version of the '
>>>>>> $:/core/modules/filters/x-listops.js
>>>>>> <#[email protected][email protected][email protected][email protected][email protected][email protected]_%24%3A%2Fcore%2Fmodules%2Ffilters%2Fx-listops.js>'
>>>>>>
>>>>>> filters to your wiki (from the More/Systems tab.)
>>>>>>
>>>>>> This mechanism has several advantages over my previous <<cycleTags>>
>>>>>> macro:
>>>>>> -- only one reference list required
>>>>>> -- no conflicts between multiple buttons cycling the same tag
>>>>>> -- can work forward/reverse
>>>>>> -- can cycle multiple items in multiple lists/tiddler
>>>>>>
>>>>>> If you prefer this in the form of a macro, this works much like the
>>>>>> old macro (taking values from the 'list' field of the current tiddler):
>>>>>>
>>>>>> \define cycleTags()
>>>>>> <$button>
>>>>>> <$action-listops $tags="+[cycle{!!list}]"/>
>>>>>> Cycle Tag</$button>
>>>>>> \end
>>>>>>
>>>>>> -- or, even simpler:
>>>>>>
>>>>>> \define cycleStatus()
>>>>>> <$button>
>>>>>> <$action-listops $tags="+[cycle[active waiting done]]"/>
>>>>>> Cycle Status</$button>
>>>>>> \end
>>>>>>
>>>>>> regards
>>>>>>
>>>>>> On Friday, 15 January 2016 11:29:46 UTC+2, Casey Allan wrote:
>>>>>>>
>>>>>>> Oh, this is cool. Thanks, Matabele.
>>>>>>>
>>>>>>
--
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 [email protected].
To post to this group, send email to [email protected].
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/f8c34cb3-f7fd-48e5-8a0e-bb04e1b7a8d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.