# Template:Diff

### Usage edit

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**[2]**which expands on clicking to the

url:**https://en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=0**`{{diff|1952247|1952469}}`

yields [3]`{{diff|1952469}}`

yields [4]`{{diff|1952469|}}`

yields [5]`{{diff||1952469}}`

yields [6]`{{diff}}`

yields [7]

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 [8]`{{diff|1952469|1952247|diffonly=1}}`

yields [9]`{{diff|1952247|1952469|only=}}`

yields [10]

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