1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 19:53:17 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/macros/TimelineMacro.tid
Jermolene 1b0eec143e Refine preliminary list macro
@pmario: I’ve taken your suggestion and made the HTML element type(s)
be macro parameters.
2014-09-17 12:13:24 +01:00

32 lines
956 B
Plaintext

title: TimelineMacro
tags: Macros
modified: 20140913100126081
caption: timeline
The timeline macro produces a list of tiddlers in reverse chronological order of modification date that is grouped by the date of the day of modification.
! Parameters
|!Position |!Name |!Description |!Default |
|1st |limit |The maximum number of tiddlers to list |100 |
|2nd |format |A DateFormat string for formatting the date |DDth MMM YYYY |
|3rd |subfilter |A subfilter to include in the timeline filter (see below) | |
The subfilter and limit parameters are spliced into the filter string like this:
```
[!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[modified]]
```
To restrict the timeline to a particular tag, the subfilter can be set to something like `tag[mytag]`:
```
<<timeline limit:10 subfilter:"tag[mytag]">>
```
! Examples
<$macrocall $name="wikitext-example-without-html"
src="<<timeline limit:30 format:'DD/MM/YYYY'>>
"/>