[TW5][Noob]Adding next 10 tiddlers in the list to storylist

117 views
Skip to first unread message

Rizwan Ishak

unread,
Aug 16, 2016, 4:46:55 AM8/16/16
to TiddlyWiki
Hi
I made a list of 10 tiddlers appear in storylist using the code
<$makelist tiddler="$:/StoryList" set="!!list" filter="[tag[A]fieldA{!!fieldA}limit[10]]">
<$button class="tc-btn-text" message="tw-make-list">
TextAppearingOnMyButton
</$button>
</$makelist>

I was wondering if there was a way to add a tiddler to the storylist with a button reading next - onclick which will add the next 10 tiddlers of the above used flter to the storylist?

Sorry the solution is apparent. I promise I did my fair share of searching.

On a rather unrelated note, what is a way to add 'OR' to the filter parameters?

PMario

unread,
Aug 16, 2016, 8:33:55 AM8/16/16
to TiddlyWiki
Hi,

$makelist widget is not part of the core and not needed anymore.


You can achieve the same result with the $action-listops widget, which is part of the core.

eg:

<$button>
<$action-listops $tiddler="$:/StoryList" $field="list" $filter="[[]]"/>
<$action-listops $tiddler="$:/StoryList" $field="list" $filter="[tag[TableOfContents]limit[3]]"/>
Set the 'StoryList list field'
</$button>

So you should have a closer look to http://tiddlywiki.com/#ActionListopsWidget  and the $filter and $subfilter parameters.

have fun!
mario


Matabele

unread,
Aug 17, 2016, 12:24:13 AM8/17/16
to TiddlyWiki
Hi -- From the TiddlyWiki docs:

A sequence of separate runs will select the tiddlers that match any of the runs. We can use this to find recipes that serve either 3, 4 or 5 people:

[serving[3]] [serving[4]] [serving[5]]

If we want to ignore vegetarian recipes that serve 4, we can say this:

[serving[3]] [serving[4]!tag[Vegetarian]] [serving[5]]

By default, each run considers every tiddler in the wiki. But we can use a + sign to force a run to consider only the tiddlers that were selected by the preceding runs:

[serving[3]] [serving[4]] [serving[5]] +[tag[Vegetarian]] +[sort[title]]

This selects recipes for 3, 4 or 5 people, then filters those to keep only the vegetarian ones, and finally sorts any that are left into alphabetical order of title.

In a similar way, we can use a - sign to remove a run's tiddlers from the result so far. Here we select all vegetarian recipes apart from two:

[tag[Vegetarian]] -[title[ScrambledEggs]] -BeansOnToast


regards

Rizwan Ishak

unread,
Aug 17, 2016, 11:14:18 AM8/17/16
to TiddlyWiki
 Thank you so much guys. Mischief Managed.
 I didnt know about makelist. It worked, so was sticking with it. Thank you for pointing me to a better direction.
Reply all
Reply to author
Forward
0 new messages