Changes

Jump to navigation Jump to search

Template:Infobox Location/sandbox

2,319 bytes added, 22:28, 30 October 2014
no edit summary
<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 =
</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.
 
Normally the heading of infobox is the same as pagename (which should be in English if possible). If for some reason you need to have different heading use ''name'' parameter. For location name in native language use parameter ''name_native'' - that will be showed somewhat smaller under main heading.
 
You can as well specify various symbols (flags, coat of arms) by parameters ''symbol'', ''state_symbol'', ''subdivision_symbol'', ''region_symbol'' and ''subdivision2_symbol''. Just find appropriate picture at wikimedia or upload it to hitchwiki and write its name e.g. <code><nowiki>|state_symbol = Flag of Texas.svg</nowiki></code>
''map'' is in format like this: <code><nowiki><map lat='51.2' lng='3.2' zoom='11' /></nowiki></code>;
! Result
|-
| In page named Bruges:<pre>{{Infobox Location/sandbox|map = <map lat='51.2' lng='3.2' zoom='11' />
|country = Belgium
|name_native = Brugge
|region = Vlaanderen
|subdivision2_type = province
|subdivision2_name = West-Vlaanderen
|map = <map lat='51.2' lng='3.2' zoom='11' />
|pop = 117073
|motorways = {{Abe|17}}, {{E|40}}
}}</pre>
| {{Infobox Location/sandbox
|map name = <map latBruges|name_native ='51.2' lng='3.2' zoom='11' />Brugge
|country = Belgium
|region = Vlaanderen
|subdivision2_type = province
|subdivision2_name = West-Vlaanderen
|map = <map lat='51.2' lng='3.2' zoom='11' />
|pop = 117073
|motorways = {{Abe|17}}, {{E|40}}
}}
|-
|country = USA
|state = Texas
|state_symbol = Flag of Texas.svg
}}</pre>
| {{Infobox Location/sandbox
|country = USA
|state = Texas
|state_symbol = Flag of Texas.svg
}}
|-
| <pre>{{Infobox Location/sandbox
|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
|motorways = {{Ade|3}} {{Ade|6}} {{Ade|9}} {{Ade|73}}
|BW = Germany/DE/Bavaria/02/Nuremberg/2861650
|hitchbase = 34
|links = [http://travel.wikia.com/wiki/N%C3%BCrnberg/Tips_for_hitchhikers Example link] [http://somelink Another link]
}}</pre>
| {{Infobox Location/sandbox
|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
|motorways = {{Ade|3}} {{Ade|6}} {{Ade|9}} {{Ade|73}}
|BW = Germany/DE/Bavaria/02/Nuremberg/2861650
|hitchbase = 34
|links = [http://examplelink Example link] [http://anotherlink Another link]
}}
|}
</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" class="infobox-h1" | <div>{{#if: {{{symbol|}}} | [[File:{{{symbol}}}|x20px]] }}{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}}</div>''{{{name_native|}}}''
|-
| colspan="2" class="infobox-map" | {{{map|}}}
|-
| ! colspan="2" class="infobox-h2" | '''Information'''
|-
! style="width: 50%;" | Country: {{IsIn|{{{country}}}}}|[[File:Flag of {{{country}}}.svg|20pxx20px|borderright|Flag of {{{country}}}]] {{IsIn|{{{country}}}}}| [[{{{country}}}]]
|-
{{#if: {{{state|}}} | ! State: {{#if: {{{state_symbol|}}} | [[File:{{{state_symbol}}}|x20px|right]] }} {{#ifexist: {{{state}}} | {{IsIn|{{{state}}}}} | {{#ifexist: Category:{{{state}}} | {{IsIn|Category:{{{state}}}}} }} }}
{{!}} [[{{{state}}}]] }}
|-
{{#if: {{{subdivision_type|}}} | {{#if: {{{subdivision_name|}}}| ! {{ucfirst:{{{subdivision_type}}}}}: {{#if: {{{subdivision_symbol|}}} | [[File:{{{subdivision_symbol}}}|x20px|right]] }} {{#ifexist: {{{subdivision_name}}} | {{IsIn|{{{subdivision_name}}}}} | {{#ifexist: Category:{{{subdivision_name}}} | {{IsIn|Category:{{{subdivision_name}}}}} }} }}
{{!}} [[{{{subdivision_name}}}]] }} }}
|-
{{#if: {{{region|}}} | ! Region: {{#if: {{{region_symbol|}}} | [[File:{{{region_symbol}}}|x20px|right]] }} {{#ifexist: {{{region}}} | {{IsIn|{{{region}}}}} | {{#ifexist: Category:{{{region}}} | {{IsIn|Category:{{{region}}}}} }} }}
{{!}} [[{{{region}}}]] }}
|-
{{#if: {{{subdivision2_type|}}} | {{#if: {{{subdivision2_name|}}}| ! {{ucfirst:{{{subdivision2_type}}}}}: {{#if: {{{subdivision2_symbol|}}} | [[File:{{{subdivision2_symbol}}}|x20px|right]] }} {{#ifexist: {{{subdivision2_name}}} | {{IsIn|{{{subdivision2_name}}}}} | {{#ifexist: Category:{{{subdivision2_name}}} | {{IsIn|Category:{{{subdivision2_name}}}}} }} }}
{{!}} [[{{{subdivision2_name}}}]] }} }}
|-
|-
{{#if: {{{hitchbase|}}} | ! More info:
{{!}} [http://hitchbase.com/ergebnisse.php?LANG=eng&abfrage%5Bstartort%5D={{{hitchbase}}} Hitchbase] {{#if: {{{links|}}} | ,{{{links}}} }} | {{#if: {{{links|}}} | ! More info:
{{!}} {{{links}}} }} }}
|-

Navigation menu