G2G: Could template examples be rendered with the current date? [closed]

+4 votes
279 views

Could we update examples on external link templates that use source access dates to render on the template page with today's date? I was just using Template:DAR-grs and wishing for this.

Here's a Wikipedia template that has this coded on the documentation with these parameters:
date{{=}}{{CURRENTMONTHNAME}} {{CURRENTYEAR}}

closed with the note: answered
in WikiTree Tech by Karen Lowe G2G6 Pilot (208k points)
closed by Karen Lowe

1 Answer

0 votes
No.

That date is then updated each time the page is edited. I think it can change also between edits if the page drops out of cache.
by Aleš Trtnik G2G6 Pilot (882k points)

Thanks, but I'm looking for the date in the example on the template page to update each time the page is viewed, not each time it is edited. This uses mediawiki Magic Words: https://www.mediawiki.org/wiki/Help:Magic_words

For example, I added this just above the Biography heading on my profile and I fully expect it to display 31 March 2023 tomorrow:
Today's date is: {{CURRENTDAY}} {{CURRENTMONTHNAME}} {{CURRENTYEAR}}

If the template's documented example (not the template itself) used these magic words I could copy the example and use it in a profile without having to manually change the date.


I've been trying this in the Scratchpad on the home page, where the magic words work well, but I can't use <nowiki> or &lcub; to render the curly brackets. Any idea how to do that so I can just do this myself there?

You could try the entity number instead of the entity name -- &#123;&#123;what you call the magic word&#125;&#125;

There is another problem. I think using {{CURRENT..}} templates either doesn't update each day or disables the caching. Try looking at your page today and tomorow without being logged in.

I added the date to template example. You will see how it works. But that template is not approved. External link  Templates shouldn't contain full source citation. Just the URL. At some point ancestor name and access date will be removed from the template. I guess EditBOT will have to add existing text from the template. I already did that for some other link templates.

Thanks for giving this a try! Mindy and Donna advised that I could also do this in a personal space page.

You might coordinate with the 1776 project for this template, as Kitty Smith worked diligently with the Daughters of the American Revolution to approve the format. Perhaps they could post the approved format in their project pages and the template could just provide the link.

Related questions

+20 votes
5 answers
+18 votes
1 answer
+11 votes
1 answer
+9 votes
5 answers
+13 votes
2 answers
+4 votes
1 answer
+30 votes
6 answers
...