Template:Last edit/doc
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 template:Page history ( talk edit history links ), 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:
Template:Last edit/doc: 2007-11-22, 01:22, by Patrick (talk)
Last edit of pageThe 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]- Creating a page which applies substitution on the next save
- template:page history ( talk edit history links )
- template:edit counter ( talk edit history links ) for an example which actually uses its parameter
- template:Fibonacci sequence ( talk edit history links ) for another example
- Substituting this template produces one or more new substitution template calls, allowing recursive change of a page, see Help:Recursive conversion of wikitext.