Template:Az:Tag

From OpenStreetMap Wiki
Jump to navigation Jump to search

information sign

This template works just like the template {{Tag}}, but with Azeri as a default language
[Edit] [Purge] Template-info.svg Template documentation

This template is used to represent an OpenStreetMap data key or key/value pair. Elements of the content are automatically linked to appropriate wiki pages.

Usage

The template can be used in a wide variety of ways. The simplest and most common usages are:

Description Example wikitext Result
A single key {{Tag|highway}} highway=*
A specific key/value pair {{Tag|highway|residential}} highway=residential
A key with a generic, literal value (not hyperlinked) {{Tag|bridge||yes}} bridge=yes
A key with a description of value {{Tag|ref||''ref number''}} ref=ref number

Multipart keys

Some key names can have multiple parts, often associated with key namespaces. One such example is keys associated with addresses: key addr:housenumber=* is used to specify a house number, addr:street=* is used to specify a name of a street, and so on. This template provides a choice of various approaches as to how the various parts of a multipart key are formatted: while the text itself remains the same, how the parts are linked differs.

  • Single link to subkey page
    This approach treats the compound key as a single entity, and links to the wiki page describing that compound key.
    {{Tag|building:fireproof}}
    produces a single link to the Key:building:fireproof wiki page, like so:
    building:fireproof=*
    This approach is most useful where a compound key is described on its own page, such as Key:building:fireproof or Key:addr:flats.
  • Single link to main key page: The following wikitext:
    {{Tag|addr|subkey=housenumber}}
    produces a single link to the main Key:addr wiki page, like so:
    addr:housenumber=*
    This approach is most useful where a collection of subkeys is described on the wiki page of the main key itself, such as Key:addr.
  • Multiple links to main key pages
    {{Tag|oneway|:=bicycle}}
    produces separate links to each of the main wiki pages Key:oneway and Key:bicycle, like so:
    oneway:bicycle=*
    and:
    {{Tag|cycleway|:=right|::=smoothness}}
    produces separate links to each of the main wiki pages Key:cycleway, Key:right and Key:smoothness, like so:
    cycleway:right:smoothness=*
    This approach is most useful where each of the parts of the key is itself a main key, such as oneway:bicycle=*, where Key:oneway and Key:bicycle are both present.

Multiple values

Some keys can have multiple values specified, with each separated by a semicolon. Up to two additional values may be specified with this template, like so:

Example wikitext Result
{{Tag|motor_vehicle|agricultural|;=forestry}} motor_vehicle=agricultural;forestry
{{Tag|access|agricultural|;=forestry|;;=destination}} access=agricultural;forestry;destination

To illustrate in the wiki the presence of different values and link to each values (including the use of {{TagValue}}).

Example wikitext Result
{{Tag|wheelchair||({{TagValue|wheelchair|yes}}/{{TagValue|wheelchair|no}})}} wheelchair=(yes/no)
{{Tag|motor_vehicle||({{TagValue|motor_vehicle|agricultural}}/{{TagValue|motor_vehicle|forestry}})}} motor_vehicle=(agricultural/forestry)
{{Tag|access||({{TagValue|access|agricultural}}/{{TagValue|access|forestry}}/{{TagValue|access|destination}})}} access=(agricultural/forestry/destination)

Default target links to external sites for the values of specific keys

Some keys like wikipedia=*, wikidata=* or website=* may create external links, in that case their value in parameter 3 will be displayed (instead of just displaying an asterisk) along with their specific link according to their value; however when the value is the full URL of a website, unlike other tag values (that are generally short), that value is allowed to wrap when it is too long to fit on a line (this avoids making columns in feature tables to exceed a reasonable maximum width).

Only a few keys recognize this feature:

Example wikitext Result
{{Tag|wikipedia||fr:Paris}} wikipedia=fr:Paris
{{Tag|wikipedia|subkey=fr||Paris}} wikipedia:fr=Paris
{{Tag|wikipedia|subkey=en||Paris}} wikipedia:en=Paris
{{Tag|wikidata||Q90}} wikidata=Q90
{{Tag|operator:wikidata||Q90}} operator:wikidata=Q90
{{Tag|website||http://www.paris.fr/}} website=http://www.paris.fr/

For all other keys, the 3rd parameter is just displayed as is, without trying to convert them to new external links. This feature is also not used when the value is specified in the 2nd parameter (where it is used to generate internal links, if possible).

Linking to non-English pages

While the default action for the template is to link to the same language pages as the current one, it is possible to specify that a different language be used. The kl parameter is used to specify the language of the target of the key link, and the vl to specify the language of the value link. In each case, a standard language code is used.

Where a key contains multiple parts which are linked separately, the kl: and kl:: parameters specify the language for the second and third links, respectively. Where a value contains multiple parts, the vl2 parameter specifies the language for the second link.

The following examples illustrates this.

Example wikitext Result
{{Tag|kl=de|highway|motorway}} highway=motorway
{{Tag|highway|vl=de|motorway}} highway=motorway
{{Tag|highway|motorway|kl=de|vl=de}} highway=motorway
{{Tag|cycleway|:=right|::=smoothness|excellent|kl=de|kl:=de|kl::=de}} cycleway:right:smoothness=excellent

TemplateData

This is the TemplateData for this template used by VisualEditor.
TemplateData for Az:Tag

Displays key or key=value pair automatically linked to appropriate wiki pages

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Key1

Main key of the tag (the part before =)

Example
highway
Linerequired
Value2

The value of the key (the part after =)

Example
residential
Linesuggested
Unlinked value/description3

A description of the value which should not be linked as a value would be; second parameter should be undeclared for this to work.

Lineoptional
'':'' (key suffix/namespace):

key part that will be linked separately

Lineoptional
''::'' (2nd key suffix/namespace)::

2nd key part that will be linked separately

Lineoptional
subkey (key suffix/namespace)subkey

key part that will NOT be linked separately

Lineoptional
subkey2 (2nd key suffix/namespace)subkey2

2nd key part that will NOT be linked separately

Lineoptional
subval (2nd value); subval

separate value in addition to the first value

Lineoptional
subval2 (3rd value);; subval2

separate value in addition to the 2nd value

Lineoptional
kl (language of the key link)kl

manually set language of the wiki page linked to the key

Example
de
Lineoptional
vl (language of the value link)vl

manually set language of the wiki page linked to the value

Example
de
Lineoptional
Disable categorizationnocat

Assigning any value disables the template's category linking behavior

Example
yes
Booleanoptional

See also

  • {{TagKey}} – showing key only
  • {{TagValue}} – for showing only the value
  • {{Value}} – mark with light blue background and after font, looks similar like code
  • {{LL}} – full page name of a specified page translated into the language used in the page currently viewed, similar to this template but for all pages
  • {{Role}} – mark with light blue background and after font, looks similar like code
  • {{Prefix}} – for showing a prefix
  • {{Suffix}} – for showing a suffix