Template:Diff

diff

[edit] [history] [purge] Template documentation

UsageEdit

Displays the link for a diff. The first two numbered parameters are the ID numbers of the revisions (in either order). If only the first parameter is given, the diff is to the previous revision. If only the second is given, the diff is to the current revision. Thus:

  • {{diff|1952469|1952247}} yields diff
  • {{diff|1952247|1952469}} yields diff
  • {{diff|1952469}} yields diff
  • {{diff|1952469|}} yields diff
  • {{diff||1952469}} yields diff
  • {{diff}} yields diff

Moreover, there's an optional named Boolean parameter, only, or you can use diffonly, which, if nonzero, makes the diff URL have diffonly set.

  • {{diff|1952469|1952247|only=1}} yields diff
  • {{diff|1952469|1952247|diffonly=1}} yields diff
  • {{diff|1952247|1952469|only=}} yields diff

The third, or text, parameter, yields the text to be displayed:

  • {{diff|1952469|1952247|this diff}} yields this diff
  • {{diff|1952469|1952247|text=some text}} yields some text
Last modified on 6 November 2010, at 15:14