Changes

Jump to navigation Jump to search

Template:Infobox Location

5,310 bytes added, 10:56, 19 October 2017
no edit summary
== How to use this Template? ==
For using this template, copy&paste the following code to the '''top''' of the city article you want to edit. You can delete unused parameters. To better understand how to use it see description below or [[#Examples|examples]].
<pre>
{{Infobox Location
|name =
|name_native =
|symbol =
|country =
|state =
|state_symbol =
|subdivision_type =
|subdivision_name =
|subdivision_symbol =
|region =
|region_symbol =
|subdivision2_type =
|subdivision2_name =
|subdivision2_symbol =
|map =
|pop =
|plate =
|motorways roads = |hitchbase = |links =
}}
</pre>
You have to specify in which ''country'' the location is. Other parameters are optional. You can use ''state'' and ''region''. For specifying different administrative divisions such a province, county etc. use parameters ''subdivision_type'' with ''subdivision name'' (considered smaller than ''state'' and bigger than ''region'') and ''subdivision2_type'' with ''subdivision2_name'' (considered smaller than region). All of the above parameters are used for page categorization and breadcrumb navigation so write them correctly and as a plain text. You don't have to use <code><nowiki>[[Category:somearea]]</nowiki></code> nor <code><nowiki>{{IsIn|somearea}}</nowiki></code> in a page itself. In fact it's better to delete them from a page if template works as intended.
== How to fill in Normally the stuff ==After adding heading of infobox is the code, you can fill same as pagename (which should be in the informationEnglish if possible). Remember If for some reason you need to fill in the English name of the have different heading use ''statename'', if you're not sure, just leave it blank so that another hitchhiker can edit itparameter. For location name in native language use parameter ''popname_native'' = population of the city, ''plate'' = licence plate of the region/city if existing; and ''motorways'' the motorways nearby the city- that will be showed somewhat smaller under main heading.
Thanks a lot You can as well specify various symbols (flags, coat of arms) by parameters ''symbol'', ''state_symbol'', ''subdivision_symbol'', ''region_symbol'' and have fun using the template''subdivision2_symbol''. For more information about this, have a look Just find appropriate picture at [[How wikimedia or upload it to add the country infobox]]hitchwiki and write its name e.g. <code><nowiki>|state_symbol = Flag of Texas.svg</nowiki></code>
''map'Note'is in format like this: <code><nowiki><map lat='51.2' lng='3.2' zoom='11' /></nowiki></code>;'': This template automatically sorts the page on which it is used in the appropriate category pop'' = population; ''plate'' = licence plate of the state/provincecity/region by ; ''roads'' = major roads going around or through the parameter “state” if filled in - else city, you can write it uses the parameter “country”as a plain text, links or use templates e.g.Likewise it automatically adds the breadcrumb navigation ([[Template:IsInE]]).; So you save two redundant mentions ''hitchbase'' = ID of the statecity at [http://hitchbase.com Hitchbase]; ''links'' = other links. Use last 2 parameters only if there is 's''useful''' and '''english written''' information which is not already at hitchwiki. == Troubleshooting ==You can experiment with template functions at [[:Template:Infobox Location/provincesandbox]] and try to use it in [[Special:Mypage/region namesandbox|your sandbox]] or as a preview at any page.If you see somewhere somehow broken infobox, you can edit that page data (!) not this template.You can also write any ideas how to make it better to the [[{{TALKPAGENAME}}|talk page]].----</noinclude>== Examples =={| class="infobox borderless" style="width: 25em; text-align: left; font-size: 90%;wikitable"! Code! Result
|-
| colspanIn page named Bruges:<pre>{{Infobox Location|country = Belgium|name_native = Brugge|region = Vlaanderen|subdivision2_type = province|subdivision2_name = West-Vlaanderen|map = <map lat='51.2' lng="'3.2" style' zoom='11' />|pop = 117073|roads = {{Abe|17}} {{E|40}}}}</pre>| {{Infobox Location|name = Bruges|name_native = Brugge|country ="textBelgium|region = Vlaanderen|subdivision2_type = province|subdivision2_name = West-align:center; font-size: large;" Vlaanderen|map = <map lat='51.2' lng='3.2' zoom='11' />|pop = 117073|roads = {{Abe| 17}} {{PAGENAMEE|40}}}}
|-
| colspan<pre>{{Infobox Location|country = USA|state ="2" styleTexas|state_symbol ="text-align:center;" Flag of Texas.svg}}</pre>| {{{mapInfobox Location|country = USA|state = Texas|}state_symbol = Flag of Texas.svg}}
|-
| <pre>{{Infobox Location|name = Nuremberg|name_native = Nürnberg|symbol = Wappen von Nürnberg.svg|country = Germany|map = <map lat='49.417' lng='11.1' zoom='10' />|pop = 502491|state = Bavaria|state_symbol = Coat of arms of Bavaria.png|plate = N|roads = {{Ade|3}} {{Ade|6}} {{Ade|9}} {{Ade|73}}|hitchbase = 34|links = [http://examplelink Link1] [http://somelink Link2]}}</pre>| {{Infobox Location|name = Nuremberg|name_native = Nürnberg|symbol = Wappen von Nürnberg.svg|country = Germany|map = <map lat='49.417' lng='11.1' zoom='10' />|pop = 502491|state = Bavaria|state_symbol = Coat of arms of Bavaria.png|plate = N|roads = {{Ade|3}} {{Ade|6}} {{Ade|9}} {{Ade|73}}|hitchbase = 34|links = [http://examplelink Link1] [http://somelink Link2]}}|} </noinclude><includeonly>{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{Category|{{{country}}}|{{{state}}}|{{{subdivision_name}}}|{{{region}}}|{{{subdivision2_name}}}}}|<!-- Don't categorize when not in main (article) space. -->}}{| class="infobox mw-collapsible"! colspan="2" align=center styleclass="backgroundinfobox-h1" | <div>{{#if: {{{symbol|}}} | [[File:{{{symbol}}}|x20px]] }}{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}</div>{{#D8E2EF;" if:{{{name_native|}}} | '''Information'{{{name_native|}}}''}}
|-
! Country:|[[Image:flag_of_colspan="2" class="infobox-map" | {{{country}}}.png|20x18px|bordermap|Flag of {{{country}}}]] [[{{{country}}}]]
|-
! State:colspan="2" class="infobox-h2" | {{{state|}}}'''Information'''
|-
! Populationstyle="min-width:10em" | Country: [[File:Flag of {{{country}}}.svg|x18px|right|Flag of {{{country}}}]] {{IsIn|{{{country}}}}}| [[{{{popcountry}}}]]
|-
{{#if: {{{state|}}} | ! Licence PlateState: {{#if: {{{state_symbol|}}} | [[File:{{{state_symbol}}}|x18px|right]] }} {{#ifeq: {{PAGENAME:{{{state}}}}} | {{PAGENAME}} || {{#ifexist:{{{state}}} | {{IsIn|{{{state}}}}} | '''{{#ifexist: Category:{{{state}}} | {{plateIsIn|Category:{{{state}}}}} }} }} }}{{!}} [[{{{state}}}]] }}'''
|-
{{#if: {{{subdivision_type|}}} | {{#if: {{{subdivision_name|}}}| ! Motorways{{ucfirst:{{{subdivision_type}}}}}: {{#if:{{{subdivision_symbol|}}} | [[File:{{{subdivision_symbol}}}|x18px|right]] }} {{#ifeq: {{PAGENAME:{{{subdivision_name}}}}} | {{PAGENAME}} || {{#ifexist: {{{subdivision_name}}} | {{IsIn|{{{subdivision_name}}}}} | {{#ifexist: Category:{{{subdivision_name}}} | {{IsIn|Category:{{{subdivision_name}}}}} }} }} }}| {{!}} [[{{{motorwayssubdivision_name}}}]] }}}}
|-
{{#if: {{{region|}}} | ! More InfoRegion:{{#if: {{{region_symbol|}}} | [[File:{{{region_symbol}}}|x18px| right]] }} {{#ifeq: {{PAGENAME:{{{region}}}}} | {{PAGENAME}} || {{#ifexist: {{{region}}} | {hitchbase{IsIn|null{{{region}}}}} | null {{#ifexist: Category:{{{region}}} | {{IsIn| Category:{{{region}}}}} }} }} }}{{!}} [[http://hitchbase.com/ergebnisse.php?LANG=ger&abfrage%5Bstartort%5D={{{hitchbaseregion}}} Hitchbase]] }}
|-
{{#if: {{{subdivision2_type|}}} | {{#if: {{{subdivision2_name|}}}| ! {{ucfirst:{{{subdivision2_type}}}}}: {{#if: {{{subdivision2_symbol| colspan="2" style="font-size}}} | [[File: smaller;" {{{subdivision2_symbol}}}| x18px|right]] }} {{#ifeq: {{PAGENAME:{footnotes{{subdivision2_name}}}}} |{{PAGENAME}} || {{#ifexist: {{{subdivision2_name}}}|{{IsIn|{{{subdivision2_name}}}}<includeonly>} | {{#ifexist: Category:{{{statesubdivision2_name}}}|{{IsIn|Category:{{{subdivision2_name}}}}} }} }} }}{{!}} [[Category:{{{statesubdivision2_name}}}]]}} }}|-{{#if: {{{pop|[[Category}}} | ! Population:{{!}} {{Ifnumber | {{{pop}}} | {{formatnum:{{{pop}}}}} | {{{pop}}} }} }}|-{{#if: {{{plate|}}} | ! Licence plate:{{!}} '''{{{plate}}}''' }}|-{{#if: {{{roads|}}}{{{motorways|}}} | ! Major roads:{{!}} {country{{roads|{{{motorways|}}}}}}]]}}|-{{#ifexistif: {{{statehitchbase|}}}|! More info:{{!}} [http://hitchbase.com/ergebnisse.php?LANG=eng&abfrage%5Bstartort%5D={{IsIn{hitchbase}}} Hitchbase] {{#if: {{{links|}}} |{{{statelinks}}}}}|{{IsIn#if: {{{links|}}} |! More info:{{!}} {country{{links}}}}}}}|-! colspan=2 {{!}} Meet fellow hitchhikers on [[:trustroots-location:{{urlencode:{{PAGENAME}}}}|Trustroots]]|}</includeonly> <noinclude>[[Category:TemplatesInfoboxes]]
</noinclude>

Navigation menu