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

Template:Official URL/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Official URL
This is the template sandbox page for Template:Official URL (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 17,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses the Wikidata property:
  • official website (P856) (see uses)

Contents

  • 1 Usage
  • 2 Modules and templates used
  • 3 TemplateData
  • 4 See also

Usage

edit

There are no parameters for this template. Typical usage is:

{{Infobox settlement
...
| website = {{Official URL}}
}}

This template is for use in infoboxes. It links to property P856 (official website) at Wikidata to retrieve the website and displays in the same way as {{URL}}. If there is no property P856 at Wikidata, nothing will be displayed (unlike {{URL}} which gives an error message). When a website needs to be added or changed, simply go to the Wikidata item and add or change the website at Wikidata. With this template, no edits will be needed at the article (just refresh the page if the website is not visible). An edit link to the Wikidata property is displayed via {{EditAtWikidata}}.

The following templates implement the function of this one intrinsically:

  • {{Infobox OS}}
  • {{Infobox programming language}}
  • {{Infobox software}}
  • {{Official website}}

Modules and templates used

edit
  • Module:URL via {{URL}}
  • Module:Wd via {{Wikidata}}
  • Module:If empty via {{If empty}}

TemplateData

edit
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Official URL in articles based on its TemplateData.

TemplateData for Official URL

This template is for use in infoboxes. The template outputs the website URL (e.g. "www.example.com") for the article subject with a link to the URL, using the "official website" field (field P856) from the associated Wikidata page, if available. It will not display https:// or http://, but the link will work based on what is specified in Wikidata.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
No parameters specified

See also

edit
  • {{Official website}}
The above documentation is transcluded from Template:Official URL/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Official_URL/sandbox&oldid=1260953580"
Last edited on 3 December 2024, at 13:58

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 3 December 2024, at 13:58 (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