Template:Oldid
| This template is used on approximately 15,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template creates links to "oldids"; that is, links to old versions of a wiki page. It then labels those old versions the current one, unless you've supplied both the name of the page and the oldid.
Every historical version of a page has a revision ID, which you can find from the links listed on the page history or from a URL parameter for the old revision. Given a page name and a revision ID, you can construct a link to that particular version.
If you only have the revision ID and not the page name, consider using the {{Oldid2}} template instead, as it only requires the revision ID to construct a valid link.
Usage
Basic syntax
{{Oldid|page|oldid|label}}
Parameters
|page=- the target page name (suggested, alias:
|1=)
|oldid=- the target page revision number; explicitly assigning the value
curor leaving it unset creates a link to the current version of the page (required, alias:|2=)
|label=- the link text (optional, aliases:
|title=and|3=)
Examples
| Code | Result |
|---|---|
{{Oldid|Main Page|589841|2003 version of Main Page}}
| 2003 version of Main Page |
{{Oldid|Main Page|589841}}
| Old revision of Main Page |
{{Oldid|Main Page}} (of very limited value)
| Current version of Main Page |
TemplateData
TemplateData for Oldid
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Page name | page1 | The page whose older revision will be linked to. | Page name | suggested |
| Revision number | oldid2 | If not specified, links to the current version. Every historical version of a page has a revision ID, which you can find from the history of the page, or from the URL of the old revision. This should be a long number, like "560214444" (without the quotes).
| Number | required |
| Link text | labeltitle 3 | If not specified, label of link will be "Old revision of [the name of the page]" (without the quotes). The label of the link that will be created. | Line | optional |
See also
- {{Oldid2}} – Does not require the page name and can create a link to a section
- {{Cross-wiki oldid}}
- {{Cross-wiki language oldid}}
- {{Diff}} – Uses a similar approach to generating links as the function for comparing page revisions ("diffs")
- {{Diff2}}
- {{Diff3}}
- {{Diff4}}
- {{History}} – Link to a page's edit history
- {{Update after}}
- Special:Permalink (help)