Template:Last edit
{{subst:Last edit|Last edit of page Template:Last edit: 2024-11-4, 22:30, by ~~~}}
The wikitext
- <span style="display:none">{{subst:Last edit}}</span>
or
- <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
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 m:Template:Page history (backlinks, edit), 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.
Example:
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.
- Todo
- 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)
See also
[edit source]Creating a page which applies substitution on the next save
- m:Template:page history (backlinks, edit)
- m:Template:edit counter (backlinks, edit) for an example which actually uses its parameter
- m:Template:Fibonacci sequence (backlinks, edit) for another example
- Substituting this template produces one or more new substitution template calls, allowing recursive change of a page, see m:Help:Recursive conversion of wikitext.