Greetings,
I'm feeling a bit thick right now having tried a large(ish) number of
things and having probably missed the very simple solution.
I'm trying to create a Template:Timestamper so that including
{{Timestamper}} in a page generates a static timestamp, detailing when the
template was first added to the page.
I'm orbiting around the following content for Template:Timestamper:
<includeonly>{{ {{{|safesubst:}}}CURRENTTIMESTAMP }}</includeonly>
but the resulting timestamp remains dynamic: every time I reload the page
it changes to reflect current time. Instead, I'd like a frozen timestamp.
Normally I'd simply include {{subst:CURRENTTIMESTAMP}} directly in the page
but I'm trying to create a bigger template to simplify my users life: I'd
like it to automatically display when the template was first included in
the page and by whom, hence this simpler "timestamper" question.
I'm sure I'm missing an incredibly simple solution...
Regards,
Manu
Show replies by date
This cannot be done with a template, unless it is used in pages as
{{subst:Timestamper}}. (This might still be worthwhile if the template
is a bit more complicated than in your example.)
MediaWiki has a built-in syntax to generate a pretty timestamp: ~~~~~
(five tildes) – the output is something like "19:07, 6 September 2016
(UTC)". Perhaps your users can just use that?
--
Bartosz Dziewoński