Template:Infobox settlement/Wikidata and Template:Infobox settlement/Wikidata/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
m (1 revision imported)
 
m (1 revision imported)
 
Line 1: Line 1:
<noinclude>{{Improve documentation|date=September 2017}}</noinclude><includeonly>{{Infobox settlement
<noinclude>{{Improve documentation|date=September 2017}}</noinclude>
 
{{Infobox settlement
<!-- See Template:Infobox settlement for additional fields and descriptions -->
<!-- See Template:Infobox settlement for additional fields and descriptions -->
| name                   = {{PAGENAMEBASE}}
| name     = {{PAGENAMEBASE}}
| native_name            =  
| native_name            =  
| native_name_lang        = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead -->
| native_name_lang        = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead -->
| settlement_type        = {{#if: {{#property:P31}} | [[{{#property:P31}}]] }}
| settlement_type        = {{#if: {{#property:P31}} | [[{{#property:P31}}]] }}
| image_skyline          = {{#property:P18}}
| image_skyline          = {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | ps=1 |P18 |name=skyline |qid={{{qid|}}}|{{{image|}}} }}| size={{{image size|{{{image_size|{{{imagesize|}}} }}} }}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}}
| image_alt              =  
| caption                = {{#invoke:WikidataIB |getValue | ps=1 |P18 |qid={{#invoke:WikidataIB |getQid |qid={{{qid|}}} }} |fwd={{{fwd|ALL}}} |osd=no |noicon=y |qual=P2096 |qualsonly=yes | maxvals=1|{{{caption|}}} }}
| image_caption          =  
| image_flag              = {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | ps=1 |P41 |name=flag |qid={{{qid|}}}|{{{image|}}} }}| size={{{image size|{{{image_size|{{{imagesize|}}} }}} }}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}}
| image_flag              = {{#property:p41}}
| flag_alt                =  
| flag_alt                =  
| image_seal              = {{#property:p158}}
| image_seal              = {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | ps=1 |P158 |name=seal |qid={{{qid|}}}|{{{image|}}} }}| size={{{image size|{{{image_size|{{{imagesize|}}} }}} }}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}}
| seal_alt                =  
| seal_alt                =  
| image_shield            = {{#property:p94}}
| image_shield            = {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | ps=1 |P94 |name=shield |qid={{{qid|}}}|{{{image|}}} }}| size={{{image size|{{{image_size|{{{imagesize|}}} }}} }}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}}
| shield_alt              =  
| shield_alt              =  
| nickname                = {{#property:p1449}}
| nickname                = {{#invoke:WikidataIB | getValue | ps=1 |P1449 |qid={{{qid|}}} }}
| motto                  =  
| motto                  =  
| image_map              = {{#if: {{#property:p242}} | {{#property:p242}} | }}  
| image_map              = {{#if: {{#invoke:WikidataIB | getValue | ps=1 |P242 |qid={{{qid|}}} }} | {{#invoke:InfoboxImage |InfoboxImage |image={{#invoke:WikidataIB | getValue | ps=1 |P242 |name=flag |qid={{{qid|}}}|{{{image|}}} }}| size={{{image size|{{{image_size|{{{imagesize|}}} }}} }}} |sizedefault=frameless |upright={{{image_upright|1}}} |alt={{{alt|}}} |suppressplaceholder=yes}} | }}  
| map_alt                =  
| map_alt                =  
| map_caption            = {{#if:{{#property:p242}} | {{#if:{{#Property:P625}}|{{Coord|nosave=1|display=inline,title|format=dms}}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}{{EditAtWikidata|pid=P625|qid={{{qid|}}} }} }} }}
| map_caption            = {{#if:{{#property:p242}} | {{#if:{{#Property:P625}}|{{Coord|nosave=1|display=inline,title|format=dms}}{{#ifeq:{{{refs|yes}}}|yes|{{wikidata|references|normal+|{{{qid|}}}|P625}} }}{{EditAtWikidata|pid=P625|qid={{{qid|}}} }} }} }}
Line 27: Line 28:
| coordinates_footnotes  =  
| coordinates_footnotes  =  
| subdivision_type        = Country
| subdivision_type        = Country
| subdivision_name        = {{#if: {{#property:P17}} | [[{{#property:P17}}]] }}
| subdivision_name        = {{#if: {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P17|ps=1}} | {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P17|ps=1}} }}
| subdivision_type1      = Subdivision
| subdivision_type1      = Subdivision
| subdivision_name1      = {{#invoke:WikidataIB|getValue|rank=best|qid={{{qid|}}}|P131|fetchwikidata=ALL|onlysourced=yes}}
| subdivision_name1      = {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P131|ps=1}}
| subdivision_type2      =  
| subdivision_type2      =  
| subdivision_name2      =  
| subdivision_name2      =  
Line 42: Line 43:
| leader_party            =  
| leader_party            =  
| leader_title            =  
| leader_title            =  
| leader_name            = {{#invoke:WikidataIB|getValue|rank=best|qid={{{qid|}}}|P6|fetchwikidata=ALL|onlysourced=yes}}
| leader_name            = {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P6|ps=1}}
| unit_pref              = Metric
| unit_pref              = Metric
<!-- ALL fields with measurements have automatic unit conversion -->
<!-- ALL fields with measurements have automatic unit conversion -->
Line 83: Line 84:
| elevation_m            =  
| elevation_m            =  
| population_footnotes    = {{#if: {{wikidata|property|P1082}} | {{wikidata|references|best|P1082}} }}
| population_footnotes    = {{#if: {{wikidata|property|P1082}} | {{wikidata|references|best|P1082}} }}
| population_total        = {{wikidata|property|best|P1082}}
| population_total        = {{#if: {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P1082|ps=1}} | {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P1082|ps=1|qual=P585}} }}
| population_as_of        = {{#if: {{wikidata|property|P1082}} | {{wikidata|qualifier|best|P1082|P585}} }}
| population_density_km2  =  auto
| population_density_km2  =  auto
| population_demonym      =  
| population_demonym      =  
Line 95: Line 95:
| postal_code            =  
| postal_code            =  
| area_code_type          =  
| area_code_type          =  
| area_code              = {{#property:P473}}
| area_code              = {{#invoke:WikidataIB|getValue|qid={{{qid|}}}|P473|ps=1}}
| iso_code                =  
| iso_code                =  
| website                = {{#if: {{#property:P856}} | {{URL|{{#property:P856}}}} }}
| website                = {{#if: {{#property:P856}} | {{URL|{{#property:P856}}}} }}
| footnotes              =  
| footnotes              =  
}}</includeonly><noinclude>
}}


<noinclude>
Try it on {{Wikidata test|San Francisco|{{PAGENAME}}}}, {{Wikidata test|Vladivostok|{{PAGENAME}}}}, {{Wikidata test|Sapporo|{{PAGENAME}}}}
Try it on {{Wikidata test|San Francisco|{{PAGENAME}}}}, {{Wikidata test|Vladivostok|{{PAGENAME}}}}, {{Wikidata test|Sapporo|{{PAGENAME}}}}
</noinclude><noinclude>
</noinclude>
<noinclude>
{{Documentation}}
{{Documentation}}
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
<!--Please add this template's categories to the /doc subpage, not here - thanks!-->
</noinclude>
</noinclude>