Template:DescriptionCategories

From OpenStreetMap Wiki
Jump to: navigation, search
[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation

This template adds appropriate category links to a feature description page. Category links are generated on a per-language basis according to the information found in Template:DescriptionCategoriesLang

Usage

Full parameter set in vertical format
Vertical list Prerequisites Brief instructions / notes
{{DescriptionCategories
| type  = 
| key   = 
| value = 
| group = 
| status =
| debug = 
}}
 
required
required for type=key or type=value
required for type=value or type=relation
only for type = key
optional (default is unspecified)
only in this doc page
 
 
key, value or relation
no language prefix, same key as in tag stored in OSM data
same value as in tag stored in OSM data

unspecified, proposed, approved, defacto, obsolete
don't use debug in articles
 
  • If a field name is listed in the Prerequisites column it is a prerequisite for the field to the left.

Parameters

The following parameters are recognised:

  • type: set to key to add categories appropriate to a single key; set to value to add categories appropriate to a key/value pair.
  • key: the key being described by type=key or type=value, otherwise ignored for type=relation where key=type implicitly.
  • value: if type=value or type=relation, the value being described, otherwise ignored for type=key.
  • group: the name of a feature (a feature frequently groups several related key names, and/or some tags with specific values).
  • status: the usage status of a feature (unspecified, draft, proposed, abandoned, in use, de facto, approved, rejected, obsolete...), the default is unspecified.
  • debug: if set to yes, display a list of categories, rather than adding them to the page (example on this doc page).

Languages

The language-specific information is stored in a separate template:Template:DescriptionCategoriesLang

Examples

If you want to test one of these examples in a different language, just copy it into the Template Expander and enter a correctly prefixed (e.g. "DE:" or "Pl:") page title in the "Context title" line.

See these examples in Czech, German, French, Polish.

This wikitext… …adds the page to these categories
{{DescriptionCategories
| type          = key
| key           = highway
| group         = transport
| status        = approved
}}
{{DescriptionCategories
| type          = key
| key           = highway
| status        = approved
}}
{{DescriptionCategories
| type          = value
| key           = highway
| value         = service
| status        = approved
}}
{{DescriptionCategories
| type          = value
| key           = amenity
| value         = fountain
| status        = proposed
}}
{{DescriptionCategories
| type          = key
| key           = tunnel
| group         = placement
| status        = approved
}}

See also