Template:URL to diff
This documentation is transcluded from Template:URL to diff/doc.
Category:Main message boxes
Category:Main message boxesCategory:Lua-based templates
This template converts a diff URL to use the {{Diff}} template. Diff URLs must be from the host "commons.wikimedia.org", and they must contain one of the query strings |title=, |diff= or |oldid=. In other words, they must be of the format commons.wikimedia.org/w/index.php?query. URLs of the format commons.wikimedia.org/wiki/Page name will not work.
Usage
{{subst:URL to diff|url=url|label=label}}
Parameters
url- the diff URL (required).label- a label for the diff link (optional). If this is not specified, the {{Diff}} template will produce a numbered link.
Examples
| Code | Result |
|---|---|
{{subst:URL to diff|url=https://commons.wikimedia.org/w/index.php?title=Main_Page&diff=229305583&oldid=228646277}} |
|
{{subst:URL to diff|url=https://commons.wikimedia.org/w/index.php?title=Main_Page&diff=229305583&oldid=228646277|label=a diff}} |
|
{{subst:URL to diff|url=https://commons.wikimedia.org/w/index.php?title=Main_Page&diff=229305583&oldid=228646277|label=a diff with an equals sign (=)}} |
See also
- Template:Urltowiki, for formatting URLs as wikilinks