Template:Icon: Difference between revisions

From OpenStreetMap Wiki
Jump to navigation Jump to search
mNo edit summary
(LangSwitch|lang={{{lang|}}})
 
Line 1: Line 1:
<includeonly>{{LangSwitch|lang={{langcode|{{{lang}}} }}
<includeonly>{{LangSwitch|lang={{{lang|}}}
<!--7 languages with capitalized namespaces for articles need the "Template:" namespace before the capitalized language code prefix-->
<!--7 languages with capitalized namespaces for articles need the "Template:" namespace before the capitalized language code prefix-->
|de={{Template:DE:Icon|{{{1}}}|{{{2|20px}}}}}
|de={{Template:DE:Icon|{{{1}}}|{{{2|20px}}}}}
Line 9: Line 9:
|ru={{Template:RU:Icon|{{{1}}}|{{{2|20px}}}}}
|ru={{Template:RU:Icon|{{{1}}}|{{{2|20px}}}}}
<!--Other languages without namespace for articles-->
<!--Other languages without namespace for articles-->
|ca={{Ca:Icon|{{{1}}}|{{{2|20px}}}}}
|ca={{Template:Ca:Icon|{{{1}}}|{{{2|20px}}}}}
|cs={{Cs:Icon|{{{1}}}|{{{2|20px}}}}}
|cs={{Template:Cs:Icon|{{{1}}}|{{{2|20px}}}}}
|fa={{Fa:Icon|{{{1}}}|{{{2|20px}}}}}
|fa={{Template:Fa:Icon|{{{1}}}|{{{2|20px}}}}}
|hu={{Hu:Icon|{{{1}}}|{{{2|20px}}}}}
|hu={{Template:Hu:Icon|{{{1}}}|{{{2|20px}}}}}
|pl={{Pl:Icon|{{{1}}}|{{{2|20px}}}}}
|pl={{Template:Pl:Icon|{{{1}}}|{{{2|20px}}}}}
|pt={{Pt:Icon|{{{1}}}|{{{2|20px}}}}}
|pt={{Template:Pt:Icon|{{{1}}}|{{{2|20px}}}}}
|default<!--Languages without translated Template:Icon-->={{#switch:{{{1}}}
|default=<!--Languages without translated Template:Icon-->{{#switch:{{{1}}}
|n|node=[[File:Osm element node.svg|{{{2|20px}}}|text-bottom|link={{LL|lang={{{lang|}}}|Node}}|{{{desc|node}}}]]
|n|node=[[File:Osm element node.svg|{{{2|20px}}}|text-bottom|link={{LL|lang={{{lang|}}}|Node}}|{{{desc|node}}}]]
|w|way=[[File:Osm element way.svg|{{{2|20px}}}|text-bottom|link={{LL|lang={{{lang|}}}|Way}}|{{{desc|way}}}]]
|w|way=[[File:Osm element way.svg|{{{2|20px}}}|text-bottom|link={{LL|lang={{{lang|}}}|Way}}|{{{desc|way}}}]]

Latest revision as of 23:14, 19 February 2024

[Edit] [Purge] Template-info.svg Template documentation

Display an icon and links to the corresponding wiki page.

Templates used by this template:

If you want to use the icons elsewhere, they are all listed at Category:Element icon.

Usage

Wikitext Produces Description
{{Icon|node}} or {{Icon|n}} node node
{{Icon|node|30px}} or {{Icon|n|30px}} node node (magnified)
{{Icon|way}} or {{Icon|w}} way way / line
{{Icon|closedway}} or {{Icon|c}} closed way closed way / polygon
{{Icon|area}} or {{Icon|a}} area area
{{Icon|relation}} or {{Icon|r}} relation relation
{{Icon|all}} or {{Icon|all}} All Elements all elements
{{Icon|member}} or {{Icon|m}} member member
{{Icon|role}} or {{Icon|o}} Role role
{{Icon|tag}} or {{Icon|t}} tag tag
{{Icon|key}} or {{Icon|k}} key key
{{Icon|value}} or {{Icon|v}} Value value

See test cases for all supported languages

This template display an icon and links to the corresponding wiki page.

Template parameters

ParameterDescriptionTypeStatus
Icon identifier1

Identifier of which icon to use.

Suggested values
n node w way c closedway a area r relation all m member o role t tag
Example
relation
Linerequired
Icon size2

The size of the icon to be rendered

Example
30px
Stringoptional
language of linked pagelang

Manually specify language of page where template should link to.

Example
de
Lineoptional
Icon descriptiondesc

Description visible when pointing mouse over icon.

Contentoptional