Template:Official website/doc

From Template Wiki, a repository of MediaWiki templates.
Jump to navigation Jump to search

The purpose of this template is to provide a standard format for labeling links to the official website of an article's main topic.

Usage

Four parameters are available:

  • 1= or URL= or url= is used to specify the URL.
  • 2= or name= is used to reformat the title if "Official website" is not suitable.
    • NOTE: This name should succinctly and accurately describe the external link in relation to the subject. In particular, it should not include the article subject's name as the reader reasonably expects that all external links pertain to the subject.
  • mobile= is optionally used if there is a different "official website" for use with Mobile Web devices.
  • format=flash is optionally used if the website requires Adobe Flash Player software.

Some URLs that contain special characters, such as & or =, will break the template. The solution is to prepend the URL with 1=

Code Result
{{Official website}} Official website (URL must be on Wikidata)
{{Official website|example.org}} Official website
{{Official website|www.example.org}} Official website
{{Official website|//www.example.org}} Official website
{{Official website|http://www.example.org/}} Official website
{{Official website|https://www.example.org/}} Official website
{{Official website|1=http://www.example.org/?action=view}} Official website
{{Official website|http://www.example.org|name=Example}} Example
{{Official website|example.org|mobile=http://m.example.org}} Official website (Mobile)
{{Official website|example.org|format=flash}} Official website (Requires Adobe Flash Player)

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Official website

The purpose of this template is to provide a standard format for labeling links to official websites.

Template parameters

ParameterDescriptionTypeStatus
URL1 URL

The URL that the template will link to

Stringoptional
URL Textname

The text the URL will display. If not provided this will default to 'Official website''

Stringoptional
Mobile Websitemobile

If the website has a different 'official website' for mobile devices this website can be listed here

Stringoptional
Requires Flashformat

If the website requires Adobe Flash Player software to be displayed, set this parameters value to 'flash'

Stringoptional

See also