Jump to content

Template:Undo/doc

From Wikipedia, the free encyclopedia

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]://wiki.riteme.site/w/index.php?title=SomePageName&oldid=442212827

The number after oldid= is the revision ID.

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

Usage

[edit]
{{Undo|page|oldid|diff|label}}
  • page – The title of the page.
  • oldid · undoafter – The base ID onto which the diff is generated.
  • diff · undo – The ID or keyword that is used against the base ID.
  • label – Text to display as link. No label will give an "undo" link.

Examples

[edit]
  • {{Undo|Wikipedia:Pagediff|204934693|204901573}}
    • 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.
  • {{Undo|Wikipedia:Pagediff|204934693|204901573|revert an edit}}
    • revert an edit
      • 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"

See also

[edit]

TemplateData

[edit]

A template that is intended to be useful for creating links to undo specific diffs.

Template parameters

ParameterDescriptionTypeStatus
Pagepage

The title of the page.

Page namerequired
Oldidoldid undoafter

The base ID onto which the diff is generated. Some number like "442212827" (without the quotes).

Numberrequired
Diffdiff undo

The ID or keyword that is used against the base ID.

Numberrequired
Labellabel

Text to display as link. No label will give a numbered link.

Default
undo
Lineoptional