diff --git a/core/wiki/macros/timeline.tid b/core/wiki/macros/timeline.tid index 60481ba7a..62f8782cf 100644 --- a/core/wiki/macros/timeline.tid +++ b/core/wiki/macros/timeline.tid @@ -1,9 +1,9 @@ title: $:/core/macros/timeline tags: $:/tags/Macro -\define timeline(limit:"100",format:"DDth MMM YYYY") +\define timeline(limit:"100",format:"DDth MMM YYYY",subfilter:"")
-<$list filter="[!is[system]has[modified]!sort[modified]limit[$limit$]eachday[modified]]"> +<$list filter="[!is[system]$subfilter$has[modified]!sort[modified]limit[$limit$]eachday[modified]]">
<$view field="modified" format="date" template="$format$"/> <$list filter="[sameday{!!modified}!is[system]!sort[modified]]"> diff --git a/editions/tw5.com/tiddlers/macros/TimelineMacro.tid b/editions/tw5.com/tiddlers/macros/TimelineMacro.tid index 0d2866257..74a00eec9 100644 --- a/editions/tw5.com/tiddlers/macros/TimelineMacro.tid +++ b/editions/tw5.com/tiddlers/macros/TimelineMacro.tid @@ -1,6 +1,6 @@ title: TimelineMacro tags: Macros -modified: 20140905084423561 +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. @@ -10,6 +10,19 @@ The timeline macro produces a list of tiddlers in reverse chronological order of |!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]`: + +``` +<> +``` ! Examples