Feature request: Timeline macro and transclusion

Hi everyone

At some point ould the timeline macro be extended to allow the user to manipulate what is displayed for the tiddlers instead of a link? Maybe allowing different list item templates to be specified?

I am thinking of publishing a list of personal observations organized by date. I will probably create some convoluted list widget but the timeline seems the most natural way to do that. But it only renders links and the documentation doesn’t give the impression that one can specify that.

Hi Dave,
Have a closer look at: https://tiddlywiki.com/#%24%3A%2Fcore%2Fmacros%2Ftimeline

The first macro definition states:

\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

So you can do something as follows. I did just add a text “- test” to every element, just to show what it does.

\define timeline-title()
\whitespace trim
<!-- Your new title template comes here -->
<$view field="title"/> - test
\end

<<timeline limit:20>>

So you should be able to define what you need.

You may also interested in

Timelines plugin — vertical and horizontal timeline and sequence (kookma.github.io)

3 Likes

Thanks Mohammad! I am aware of that and it is an awesome but a very different tool from what I need here.

Thanks Mario! This worked perfectly. I cloned it and made a bunch of adjustments, and it works great. I did not use the css classes below. I just added 2’s to nullify them and leave them in case I need them later.

$:/.giffmex/macros/timeline2
$:/tags/Macro

\define timeline-transclude()
\whitespace trim
<$transclude field="text" mode="block"/>
\end
\define timeline2(limit:"100",format:"DDth MMM YYYY",subfilter:"",dateField:"modified")
<div class="tc-timeline2">
<$list filter="[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]">
<div class="tc-menu-list-item2">
<b><$view field="$dateField$" format="date" template="$format$"/></b>
<ol><$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
<div class="tc-menu-list-subitem2">
<li><<timeline-transclude>></li>
</div>
</$list></ol>
</div>
</$list>
</div>
\end