I want to tweak the system macro timeline
a little bit. Here is the code as you can see there are two list widgets in it. Outer list widget loop the date, and inner list loop the specific tids.
If you add keyword count
on each. You can limit the count of date or the count of the tids in specific date.
What I want now is count them all and ignore date, let say I want 20 tids list out.
If Today have 15 and yesterday has 20, the final list will get all tids in today and top 5 in yesterday.
And I dont want to break the structure. how to make it?
Name of the tid need modified: $:/core/macros/timeline
\define timeline-title()
\whitespace trim
<!-- Override this macro with a global macro
of the same name if you need to change
how titles are displayed on the timeline
-->
<$view field="title"/>
\end
\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
<div class="tc-timeline">
<$list filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]">
<div class="tc-menu-list-item">
<$view field="$dateField$" format="date" template="$format$"/>
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]!limit[10]]">
<div class="tc-menu-list-subitem">
<$transclude tiddler={{!!icon}}/> <$link to={{!!title}}><<timeline-title>></$link>
</div>
</$list>
</div>
</$list>
</div>
\end