On Friday, July 31, 2020 at 10:00:20 PM UTC-7, Rafael Oliveira wrote:
>
> 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?
>
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
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4ea3becf-f7ab-45c4-91a0-3c4c24ff8462o%40googlegroups.com.