Jump to content

Template:Last edit

From Meta, a Wikimedia project coordination wiki

{{subst:Last edit|Last edit of page Template:Last edit: 2024-07-18 T 08:14 UTC, by ~~~}}

Template documentation

The wikitext

<span style="display:none">{{subst:Last edit}}</span>


<span style="display:none">{{subst:Last edit|..}}</span>

produces wikitext such as

<span style="display:none">{{subst:Last edit|</span>Last edit of page [[Abc]]: 2007-04-16, 10:25 [[User:Aphaia|Aphaia]]<span style="display:none">}}</span>

rendering as

{{subst:Last edit|Last edit of page Abc: 2007-04-16, 10:25 Aphaia}}

containing the date, time, and username of the edit; they are put in the position of a parameter of the template, although not used as such, in order to make the old info disappear when new info is provided. Compare Template:Page history, where each time a new line is added.

Since the resulting wikitext (unusually containing a template call with "subst:") has again the required format, saving the page again without making any change to this part of the wikitext, with or without editing other parts of the page, causes the date, time, and username to be updated.


{{subst:Last edit|Last edit of page Template:Last edit/doc: 2023-11-22 T 17:31 UTC, by}}

The page A for which the edit info is given is mentioned, because it is the page which contains the call of this template, which may be different from the page B on which the info appears, due to transclusion of page A into page B.

Currently we haven't found the way to remove "subst".
Implement this template to ZM (Translation system); our situation is:
  • Each translation workpage has its own element (ongoing translation) and status page (inclusion). There is the third part "source" which is substituted once and only when the workpage is created.
  • The information needed is the update of source page on meta (ideally the original, but it may be on the other wiki - cannot deal with a template).
  • The whole source page should be able to included, or no one cannot start a new translation; "last edit" template seems however to be considered other parts of the page should be "noinclude" part. Hmmm?
Suggestions for Todo
  • Subst: Change its colour (to white) e.g.[1]
I included style="display:none".--Patrick 07:09, 17 April 2007 (UTC)
  • noinclusion problem:
    • One possible (albeit somewhat heavy-handed) solution is to use conditional substitution and add a variable { { {transcluded} } } to test it. Demonstration: [2] and [3]. Or, if you like,[4],[5].

See also

Substituting this template produces one or more new substitution template calls, allowing recursive change of a page, see Help:Recursive conversion of wikitext.