All I did was add ({{{ [sameday:$dateField${!!$dateField$}!is[system]$subfilter$count[]] }}})
which if you look closely is the next filter after removing the sort and adding the count[]
I suspect you are however wondering if a simpler macro could be written with the new filters?
it is a great idea!
But if I want to get the number of the tiddlers that the timeline macro returns at the top of the tiddler,how can I get it?
just like this:
5 matches 31th August 2021 (3)
Tiddler One
Another Tiddler
Tiddler Three 30th August 2021 (2)
This Tiddler
That Tiddler
…
But you’ll get performance problems if you run the same filter 2 times, just to be able to display the counter. I’d suggest to calculate the list elements first and then reuse them to be counted.
None of the operators used in the timeline macro are cached and using the “old” text substitution will also disable macro caching.
I think as Mohammad wrote the whole thing should be rewritten using v5.3.x functions procedures and the new substitute functionality.
In the above macro I limit the total number to 100 so over time the count will equal 100, and a total count does not add much value in my use case, compared to the total per day.
thanks!
I would like to ask for advice:
I created a tiddler,input
<<timeline dateField:“modified” format:“YYYY-0MM-0DD” limit:1000 subfilter:“keyword[aaaaa]”>>,and made this tiddler a timeline macro to return some tiddlers with the keyword aaaaa。
I am new to tiddlywiki,now I want this timeline macro to show the total number of the tiddlers it returns at the tiddler top,what should I do?
Would you please give me some advice
just like this:
5 matches 31th August 2021 (3)
Tiddler One
Another Tiddler
Tiddler Three 30th August 2021 (2)
This Tiddler
That Tiddler
…
We need to return to the timeline macro definition, find the filter used to list all the tiddlers, and use it again in the count widget eg; <$count filter="filter"/> or in the above macro;
Perhaps where the filter is; [!is[system]$subfilter$has[$dateField$]limit[$limit$]]
I removed the sort and eachday as I don’t think that is needed