Template:Undo/doc

This template is intended to be useful for creating links to "undo" diffs. Note: not all revisions can be undone. Use this template with care.

Every version of a page has a revision ID, which you can find from the history of the page by looking at the link for the timestamp, which is of the form: http[s]://en.wikipedia.org/w/index.php?title=SomePageName&oldid=442212827 The number after  is the revision ID.

Given a page name and two revision IDs, you can construct links undo diffs.

Usage



 * – The title of the page.
 * – The base ID onto which the diff is generated.
 * – The ID or keyword that is used against the base ID.
 * – Text to display as link. No label will give an "undo" link.

Examples

 * The page= parameter (parameter number 1) should be a name of a page, for instance Wikipedia:Pagediff.
 * The oldid= parameter (parameter number 2) should be the smaller revision number.
 * The diff= parameter (parameter number 3) should be the larger revision number.
 * The page= parameter (parameter number 1) should be a name of a page, for instance Wikipedia:Pagediff.
 * The oldid= parameter (parameter number 2) should be the smaller revision number.
 * The diff= parameter (parameter number 3) should be the larger revision number.
 * The label= parameter (parameter number 4) should be an alternate display for the link than just "undo"
 * The page= parameter (parameter number 1) should be a name of a page, for instance Wikipedia:Pagediff.
 * The oldid= parameter (parameter number 2) should be the smaller revision number.
 * The diff= parameter (parameter number 3) should be the larger revision number.
 * The label= parameter (parameter number 4) should be an alternate display for the link than just "undo"

TemplateData
{	"params": { "page": { "required": true, "label": "Page", "type": "string/wiki-page-name", "description": "The title of the page." },		"oldid": { "required": true, "label": "Oldid", "type": "number", "aliases": ["undoafter"], "description": "The base ID onto which the diff is generated. Some number like \"442212827\" (without the quotes)." },		"diff": { "required": true, "label": "Diff", "type": "number", "aliases": ["undo"], "description": "The ID or keyword that is used against the base ID." },		"label": { "required": false, "label": "Label", "type": "string/line", "default": "undo", "description": "Text to display as link. No label will give a numbered link." }	},	"description": "A template that is intended to be useful for creating links to undo specific diffs." }