1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-30 21:39:57 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/macros/TimelineMacro.tid

35 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-09-08 17:58:48 +00:00
title: TimelineMacro
2014-09-10 22:42:06 +00:00
tags: Macros
2014-11-26 11:22:20 +00:00
modified: 20141103172520228
2014-09-10 23:06:19 +00:00
caption: timeline
2014-09-08 17:58:48 +00:00
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 (see below) |100 |
2014-09-08 17:58:48 +00:00
|2nd |format |A DateFormat string for formatting the date |DDth MMM YYYY |
|3rd |subfilter |A subfilter to include in the timeline filter (see below) | |
2014-11-26 11:22:20 +00:00
|4th |dateField |Optional name of date field to use |modified |
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]">>
```
2014-09-08 17:58:48 +00:00
Note that the timeline macro does not truncate the entries for a particular day, instead always displaying all the tiddlers under each displayed day heading. This means that the limit parameter works in an unexpected way because it is possible for more than the specified number of tiddlers to be displayed.
2014-09-08 17:58:48 +00:00
! Examples
<$macrocall $name="wikitext-example-without-html"
src="<<timeline limit:30 format:'DD/MM/YYYY'>>
"/>