From Wikibooks, open books for an open world
Jump to navigation Jump to search
Template documentation[edit] [history] [purge]


Used by {{diff}}, but can be used alone, too. Displays the URL 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:

  • {{diffurl|1952469|1952247}} yields //en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=0
  • {{diffurl|1952247|1952469}} yields //en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=0
  • {{diffurl|1952469}} yields //en.wikibooks.org/wiki/?diff=1952469&diffonly=0
  • {{diffurl|1952469|}} yields //en.wikibooks.org/wiki/?diff=1952469&diffonly=0
  • {{diffurl||1952469}} yields //en.wikibooks.org/wiki/?diff=cur&oldid=1952469&diffonly=0
  • {{diffurl}} yields //en.wikibooks.org/wiki/?diff=&diffonly=0

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

  • {{diffurl|1952469|1952247|only=1}} yields //en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=1
  • {{diffurl|1952469|1952247|diffonly=1}} yields //en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=1
  • {{diffurl|1952247|1952469|only=}} yields //en.wikibooks.org/wiki/?diff=1952469&oldid=1952247&diffonly=