How can I make my tiddlers display both the last modified date and the created date?

89 views
Skip to first unread message

Rafael Oliveira

unread,
Aug 1, 2020, 1:00:20 AM8/1/20
to TiddlyWiki
By default, tiddlywiki shows on its header only the last modified date of the tiddler:


I'd like to make it display both the last modified date and its creation date as well... I've tried searching for a parameter I could add on $:/core/ui/ViewTemplate/title but I'm not sure if the solution is there. Can I add the creation date in the header by changing some configuration on small piece of code inside a core tiddler?

Eric Shulman

unread,
Aug 1, 2020, 1:15:01 AM8/1/20
to TiddlyWiki
The ViewTemplate piece you want to change is the *subtitle*, defined here: $:/core/ui/ViewTemplate/subtitle 
\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle">
<$link to={{!!modifier}} />
<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
</div>
</
$reveal>

As you can see, it has a $view widget that shows the "modified" field. To add the "created" field, you can 
duplicate the existing $view widget and change the field name to "created".  You'll probably also want
to add some spacing, punctuation or other static text notation to differentiate it from the "modified" date.
Something like this:
\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle">
<$link to={{!!modifier}} />
<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
(created: <$view field="created" format="date" template={{$:/language/Tiddler/DateFormat}}/>)
</div>
</
$reveal>

-e

Rafael Oliveira

unread,
Aug 2, 2020, 4:03:03 PM8/2/20
to TiddlyWiki

Screenshot from 2020-08-02 16-21-13.png

Nice :)
Reply all
Reply to author
Forward
0 new messages