Template:Diff/doc
Appearance
This is a documentation subpage for Template:Diff It may contain usage information, categories and other content that is not part of the original template page. |
Usage
[edit source]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 the link [1] which expands on clicking to the
url: https://en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=0{{diff|1952247|1952469}}
yields [2]{{diff|1952469}}
yields [3]{{diff|1952469|}}
yields [4]{{diff||1952469}}
yields [5]{{diff}}
yields [6]
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 [7]{{diff|1952469|1952247|diffonly=1}}
yields [8]{{diff|1952247|1952469|only=}}
yields [9]
The third, or text
, parameter, yields the text to be displayed: