Lompat ke isi

Templat:Official URL/doc: Perbedaan antara revisi

Dari Teknologi Pendidikan Wiki
Tidak ada ringkasan suntingan
 
k 1 revisi diimpor
 
(Tidak ada perbedaan)

Revisi terkini sejak 23 Maret 2026 01.40

Note that unlike {{Official website}} this template will produce the actual URL instead of just "Official website". For example (when used on the Google page, these two templates would produce the following:

  • {{Official url}} → www.google.comLua error in Modul:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).
  • {{Official website}} → Official websiteLua error in Modul:EditAtWikidata at line 30: attempt to index field 'wikibase' (a nil value).

Usage

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

<syntaxhighlight lang="wikitext">{{Infobox settlement ... | website = {{URL|example.com|optional display text}}Lua error in Modul:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value). }} </syntaxhighlight>

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:

Modules and templates used

TemplateData

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.

Parameter templat

ParameterKeteranganJenisStatus
Tak ada parameter yang ditentukan

See also