Template:Undo/doc
Appearance
This is a documentation subpage for Template:Undo. It may contain usage information, categories and other content that is not part of the original template page. |
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
{{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"
- revert an edit
See also
[edit]- {{Oldid}} – simplifies the case for linking to a known old version
- {{Diff}}
- {{Diff2}}
- {{Querylink}} – generic template to construct query strings
- diff utility – syntax highlight on wiki pages with mw:Extension:SyntaxHighlight GeSHi
TemplateData
[edit]A template that is intended to be useful for creating links to undo specific diffs.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page | page | The title of the page. | Page name | required |
Oldid | oldid undoafter | The base ID onto which the diff is generated. Some number like "442212827" (without the quotes). | Number | required |
Diff | diff undo | The ID or keyword that is used against the base ID. | Number | required |
Label | label | Text to display as link. No label will give a numbered link.
| Line | optional |