Template:Diff/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

Syntax: {{diff|oldid|text|diff}}
  • oldid represents a base revision for the diff and defaults to {{REVISIONID}}; must be a revision ID
  • text represents the link label
  • diff represents the target revision for the diff and defaults to "prev"; can be a revision ID or "prev", "next", "cur"

Note: When specifying two revision IDs, a diff can be created between the revisions of different pages in a fashion similar to Special:ComparePages. This is because revision IDs are unique across all pages within a MediaWiki instance. In most cases, one wants to ensure both revision IDs refer to revisions of the same page but the functionality can be useful when there are multiple similar pages one wants to compare, e.g.:

Instructions[edit]

  1. Open the history tab for the page in question.
  2. Click the "(prev)" link for the preferred diff.
  3. Add {{diff|oldid}} where diff number is the number after "&diff=" in your address bar.

See also[edit]