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 
>>>> <#beb7e055-d13a-43ea-9c4e-dfd8a8e3adeb@googlegroups.com_388f1d21-b285-437c-8b24-0b6a9db9cc74@googlegroups.com_1b366027-8d01-4550-894a-8243787f8a89@googlegroups.com_c00a13fa-7179-4e65-9d6e-c4e9df77e5be@googlegroups.com_%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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/75feaa6b-3ac7-4373-847e-0a7a3ba813f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to