Changes

Jump to navigation Jump to search

Template:Infobox Location

5,382 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>;''pop'' = population; ''plate'': This template automatically sorts = licence plate of the city/region; ''roads'' = major roads going around or through the page on which city, you can write it is used in the appropriate category as a plain text, links or use templates e.g. [[Template:E]]; ''hitchbase'' = ID of the statecity at [http:/province/region by the parameter “state” hitchbase.com Hitchbase]; ''links'' = other links. Use last 2 parameters only if filled in - else it uses the parameter “country”there is '''useful''' and '''english written''' information which is not already at hitchwiki.Likewise == Troubleshooting ==You can experiment with template functions at [[:Template:Infobox Location/sandbox]] and try to use it automatically adds the breadcrumb navigation (in [[TemplateSpecial:IsInMypage/sandbox|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]]. == Examples =={| class="wikitable"! Code! Result|-| In 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' zoom='11' />|pop = 117073|roads = {{Abe|17}} {{E|40}}}}</pre>| {{Infobox Location|name = Bruges|name_native = Brugge|country = Belgium|region = Vlaanderen|subdivision2_type = province|subdivision2_name = West-Vlaanderen|map = <map lat='51.2' lng='3.2' zoom='11' />|pop = 117073|roads = {{Abe|17}} {{E|40}}}}|-| <pre>{{Infobox Location|country = USA|state = TexasSo you save two redundant mentions |state_symbol = Flag of the Texas.svg}}</pre>| {{Infobox 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's/province>|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]}}</region 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" class="infobox-h1" | <div>{{#if: {{{symbol|}}} | [[File:{{{symbol}}}|x20px]] }}{{#if: {{{name|}}} | {{{name}}} | {{PAGENAME}} }}</noincludediv>{{#if:{{{name_native|}}} | ''{{{name_native|}}}'' }}|-| colspan="2" class="infobox-map" | {{{map|}}}| -! colspan="2" class="infobox borderless-h2" | '''Information'''|-! style="min-width: 25em; text-align10em" | Country: left; font-size: 90%; float[[File: Flag of {{{country}}}.svg|x18px|right;"|Flag of {{{country}}}]] {{IsIn|{{{country}}}}}| [[{{{country}}}]]
|-
{{#if: {{{state|}}} | colspan="2" style="text-align! State:center; font-size{{#if: large;" {{{state_symbol|}}} | [[File:{{{state_symbol}}}|x18px|right]] }} {{#ifeq: {{PAGENAME:{{{state}}}}} | {{PAGENAME}} || {{#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}}}|x18px|right]] }} {{#ifeq: {{PAGENAME:{{{subdivision_name}}}}} | {{PAGENAME}} || colspan="2" style="text-align{{#ifexist:center;" {{{subdivision_name}}} | {{IsIn|{map{{subdivision_name}}}}} |{{#ifexist: Category:{{{subdivision_name}}} | {{IsIn|Category:{{{subdivision_name}}}}} }} }} }}{{!}} [[{{{subdivision_name}}}]] }}}}
|-
{{#if: {{{region|}}} | colspan="2" align=center style="background! Region:{{#D8E2EF;" if: {{{region_symbol| '''Information'''}}} | [[File:{{{region_symbol}}}|x18px|right]] }} {{#ifeq: {{PAGENAME:{{{region}}}}} | {{PAGENAME}} || {{#ifexist: {{{region}}} | {{IsIn|{{{region}}}}} | {{#ifexist: Category:{{{region}}} | {{IsIn|Category:{{{region}}}}} }} }} }}{{!}} [[{{{region}}}]] }}
|-
{{#if: {{{subdivision2_type|}}} | {{#if: {{{subdivision2_name|}}}| ! Country{{ucfirst:{{{subdivision2_type}}}}}: {{#if: {{{subdivision2_symbol|}}} |[[File:Flag of {{{countrysubdivision2_symbol}}}.svg|20pxx18px|borderright]] }} {{#ifeq: {{PAGENAME:{{{subdivision2_name}}}}} |Flag of {{PAGENAME}} || {{#ifexist: {{{subdivision2_name}}} | {{IsIn|{{{subdivision2_name}}}}} | {{#ifexist: Category:{{{subdivision2_name}}} | {{IsIn|Category:{{{countrysubdivision2_name}}}}}}}]] }} }}{{!}} [[{{{countrysubdivision2_name}}}]]}} }}
|-
{{#if: {{{pop|}}} | ! StatePopulation:{{!}} {{Ifnumber | {{{pop}}} | {{formatnum:{{{pop}}}}} | {{{statepop}}} }}}}
|-
{{#if: {{{plate|}}} | ! PopulationLicence plate:| {{!}} '''{{{popplate}}}''' }}
|-
{{#if: {{{roads|}}}{{{motorways|}}} | ! Licence PlateMajor roads:{{!}} {{{roads| '''{{{platemotorways|}}}}}}}}'''
|-
{{#if: {{{hitchbase|}}} | ! MotorwaysMore info:{{!}} [http://hitchbase.com/ergebnisse.php?LANG=eng&abfrage%5Bstartort%5D={{{hitchbase}}} Hitchbase] {{#if: {{{links|}}} | {{{links}}} }} | {{#if: {{{links| }}} | ! More info:{{!}} {{{motorwayslinks}}} }}}}
|-
{{#if: {{{hitchbase|}}}| ! More Info:| [http://hitchbase.com/ergebnisse.php?LANG=ger&abfrage%5Bstartort%5Dcolspan=2 {{{hitchbase!}}} Hitchbase] | }}|}<includeonly>{{#ifexist: Category:{{{state}}}|Meet fellow hitchhikers on [[Category:{{{state}}}]]|[[Categorytrustroots-location:{{{country}}}]]}}{{#ifexisturlencode: {{{state}}}|{{IsIn|{{{state}PAGENAME}}}}|{{IsInTrustroots]]|{{{country}}}}}}}</includeonly><noinclude>[[Category:TemplatesInfoboxes]]
</noinclude>

Navigation menu