• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:URL to diff

  • Template
  • Talk
  • Language
  • Watch
  • Edit
Template documentation[view] [edit] [history] [purge]
Shortcuts
  • {{subst:UtdTemplate:Utd}}
  • {{subst:U2dTemplate:U2d}}
  • {{subst:UdiffTemplate:Udiff}}
  • {{subst:Make diffTemplate:Make diff}}
This template should always be substituted (i.e., use {{subst:URL to diff}}). Any accidental transclusions will be automatically substituted by a bot.
This template uses Lua:
  • Module:URL to diff

This template converts a diff URL to use the {{diff}} template. Diff URLs must be from the host "en.wikipedia.org", and they must contain one of the query strings |title=, |diff= or |oldid=. In other words, they must be of the format en.wikipedia.org/w/index.php?query. URLs of the format en.wikipedia.org/wiki/Page name will not work.

Contents

  • 1 Usage
  • 2 Parameters
  • 3 Examples
  • 4 See also

Usage

edit
{{subst:URL to diff|url=url|label=label}}

Parameters

edit
  • 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

edit
Code Result
{{subst:URL to diff|url=https://en.wikipedia.org/w/index.php?title=Main_Page&diff=472180272&oldid=471996095}} {{diff|Main Page|472180272|471996095}}
{{subst:URL to diff|url=https://en.wikipedia.org/w/index.php?title=Main_Page&diff=472180272&oldid=471996095|label=a diff with a label}} {{diff|Main Page|472180272|471996095|a diff with a label}}
{{subst:URL to diff|url=https://en.wikipedia.org/w/index.php?title=Main_Page&diff=472180272&oldid=471996095|label=a diff with a label containing an equals sign (=)}} {{diff|page=Main Page|diff=472180272|oldid=471996095|label=a diff with a label containing an equals sign (=)}}
{{subst:URL to diff|url=https://en.wikipedia.org/w/index.php?title=Main_Page&diff=prev&oldid=1225315602|label=a diff versus previous}} {{diff|Main Page|prev|1225315602|a diff versus previous}}

See also

edit
  • {{Urltowiki}}, for formatting URLs as wikilinks
  • {{Url to title}}
The above documentation is transcluded from Template:URL to diff/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:URL_to_diff&oldid=977794643"
Last edited on 11 September 2020, at 01:13

Languages

    • Latina
    • ਪੰਜਾਬੀ
    • Português
    • Simple English
    • Tiếng Việt
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 11 September 2020, at 01:13 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop