Template:Diff: Difference between revisions
Appearance
Content deleted Content added
be more tolerant of empty server and scriptpath parameters, also add a very basic example, mainly for CI-type testing while making changes to the template |
it's helpful to refer the readers to other similar templates that may better (or not) suit their needs |
||
| Line 31: | Line 31: | ||
* <code>server</code>: default if not provided is <code>{{SERVER}}</code> as taken from the <nowiki>{{SERVER}}</nowiki> [[:mw:Help:Magic words|magic word]] (for easier interwiki diffs see {{tlx|xdiff}}) |
* <code>server</code>: default if not provided is <code>{{SERVER}}</code> as taken from the <nowiki>{{SERVER}}</nowiki> [[:mw:Help:Magic words|magic word]] (for easier interwiki diffs see {{tlx|xdiff}}) |
||
* <code>scriptpath</code>: default if not provided is <code>{{SCRIPTPATH}}</code> as taken from the <nowiki>{{SCRIPTPATH}}</nowiki> [[:mw:Help:Magic words|magic word]] (for easier interwiki diffs see {{tlx|xdiff}}) |
* <code>scriptpath</code>: default if not provided is <code>{{SCRIPTPATH}}</code> as taken from the <nowiki>{{SCRIPTPATH}}</nowiki> [[:mw:Help:Magic words|magic word]] (for easier interwiki diffs see {{tlx|xdiff}}) |
||
== See also == |
|||
* {{tlx|xdiff}} |
|||
[[Category:Internal link templates|Diff]] |
[[Category:Internal link templates|Diff]] |
||
Revision as of 12:06, 2 August 2019
- Syntax:
{{diff|diff|page|oldid|label}}
Instructions
- Open the history tab for the page in question.
- Click the "(prev)" link for the preferred diff.
- Add
{{diff|diff|page|oldid|label}}where diff number is the number after "&diff=" in your address bar.
Example
{{diff|2986565||1884091|test diff}} => test diff
Named parameters
Besides the traditionally used positional parameters, the template also supports named parameters:
page: the name of the page from where the diff iscur: same as diff (may also be the number after "&cur=" in the URL)diff: the number after "&diff=" as described aboveoldid: the number after "&oldid="label: the text to display for the diff linkserver: default if not provided is//meta.wikimedia.orgas taken from the {{SERVER}} magic word (for easier interwiki diffs see{{xdiff}})scriptpath: default if not provided is/was taken from the {{SCRIPTPATH}} magic word (for easier interwiki diffs see{{xdiff}})
See also
{{xdiff}}