Template talk:Infobox Switzerland municipality/Archive 3

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Pictures with snow in summer[edit]

For municipalities in the mountains, e.g. ski and summer resorts, it's a bit odd to display images with snow all year. It might be preferable to provide fields for two separate images. Depending on the month, we could display one or the other. -- User:Docu

Regarding conversion of "As of" links[edit]

I've updated the population-asof links in the template to reflect the changes at WP:As of. However I noticed that some instances of the template use the format Month_name Year for the populationof parameter. This is not fully compatible with the new {{As of}} template, which will silently link the pages concerned to [[As of...]] instead of using the new categories to indicate the error. I would advise not using the month for population-asof data as it is unnecessary (I am not aware of countries that have more than one census per year...) but if users would prefer to retain it a separate parameter for the month would be the easiest way to use it. This should then be passed to the {{As of}} template as the second parameter. Recommendation: remove the month from existing instances of the template, no other work required. All the best – Ikara talk → 01:48, 8 August 2008 (UTC)[reply]

After some considerable fiddling with messy parser functions I managed to get {{As of}} to behave properly when using the Month_name Year format, so all the Swiss town articles should be correctly categorised now. Please note that the month name MUST be capitalised and spelt correctly. Please disregard the above statement. Thanks – Ikara talk → 20:14, 9 August 2008 (UTC)[reply]

Former municipalities[edit]

To improve the presentation of the infobox on former municipalities, I added a field "within_municipality" to the test version, sample at testcases#Oberwald. Quite a few municipalities merged in 2008 and on January 1, 2009 and their articles still need updating (see /to do). -- User:Docu

Inversion[edit]

At Grimentz (this version), the change in layout moves down the content of the infobox far down the page. To improve access, I'd move the map to its former place. -- User:Docu at 18:05, 3 August 2009 (UTC)[reply]

Improvements[edit]

I think this infobox could do with a few tweaks. See Oberschrot for example. I'd propose moving the map to the top below the photograph and creating the show map option like in the Austrian and Greek infoboxes instead of the "zoom". I think it looks tidier. Also the coat of arms is strangely aligned and the coordinates should go under the map near the top not in the middle. I don't know about you but I find having a pushpin map at the bottom it looks back to front and weird. The top where the name is could also use a splash of colour. Perhaps make it look more like the way the Austrian ones currently are like Karres? Dr. Blofeld White cat 16:43, 27 March 2010 (UTC)[reply]

We might want to tweak the alignment of the coordinates in the Oberschrot sample. Maybe they should be left aligned rather than centered. In the Schmitten version it looks ok.
The sample page Karres seems to make people miss most of the text in the infobox content. It's probably an editorial choice not to make use of that information.
As the text content used by this infobox is well maintained, I think we should prioritize it as it's currently done and keep the current layout.
BTW, is there a way to add a tab to the articles to show a locality on maps? At Commons users can choose to add this to categories. -- 签名 sig at 14:10, 1 April 2010 (UTC)[reply]

Edit protection[edit]

{{Editprotected|Template:Infobox Swiss town}} Please update the template with the wikicode from my sandbox User:2Neuenburg/T. I discussed the edits with a user from WikiProject Switzerland so it shouldn't be controversial.--2Neuenburg (talk) 21:01, 19 April 2010 (UTC)[reply]

Can you please describe the changes you are making? — Martin (MSGJ · talk) 06:48, 20 April 2010 (UTC)[reply]
The updated version of the template (see a few test cases) will automatically add updated population figures and maps using the SFOS code (or municipality code), the institutional websites of the communes will be also automatically added if not already present. For former municipalities, the template will now add a category according to the canton instead of the generic category 'former municipalities of Switzerland'. This diff should show all the changes.--2Neuenburg (talk) 08:07, 20 April 2010 (UTC)[reply]
The new version seems to add footnotes to the infobox? This is a nice idea, but I wonder if it will cause errors if {{reflist}} is not used on some articles. — Martin (MSGJ · talk) 10:21, 20 April 2010 (UTC)[reply]
Yes it will create the missing references error at the bottom of the page. I'm in the process of expanding all the municipality articles from Switzerland and each article will include a references section. If it'd help I can go through now and add {{reflist}} to all the articles before we modify the template. Tobyc75 (talk) 11:32, 20 April 2010 (UTC)[reply]
As long as it will be done reasonably quickly, it's good enough for me.  Done — Martin (MSGJ · talk) 11:47, 20 April 2010 (UTC)[reply]
Good work. To make it easier to tweak it, I unprotected the infobox for now. BTW, please avoid removing the infobox from former municipalities. -- 签名 sig at 04:43, 21 April 2010 (UTC)[reply]
To answer Tobyc75's question on my talk page: roland zh revert a few removals. I just reverted Tann, Switzerland -- 签名 sig at 07:40, 22 April 2010 (UTC)[reply]

{{Editprotected}} I would like to add the following wikicode to 2 sections of this template. This code will clean up some problems that occured in former municipalities articles that never or do not currently have valid Community Identification numbers (SFOS numbers). This section of code will allow the population field to be blank, non-existent or contain N/A

Extended content

|- class="mergedtoprow" {{#if:{{{population|<noinclude>x</noinclude>}}}| {{!}} '''[[Population]]'''{{!!}} {{#ifeq:{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A |{{formatnum:{{#expr: 0{{{population}}} }} }} ({{{populationof}}}) }}| {{formatnum:{{#expr: 0{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }} }} ({{#time: m/Y | {{Swiss populations date|{{{iso-code-region}}}|TIMESTAMP}} }}){{Swiss populations ref|{{{iso-code-region}}} }} }} }} {{#if:{{{population|<noinclude>x</noinclude>}}}| {{!}}- class="mergedrow" {{!}}   - '''[[Population density#Human population density|Density]]'''{{!!}} {{#ifeq:{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A | {{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} | {{formatnum:{{#expr:{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} }}

This second piece of code, hides the View map option if the is no map to view.

Extended content

|- ! colspan=2 align=center | {{#ifeq:{{{municipality_type}}}|former| {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2011.png | [[:File:Karte Gemeinde {{{subject_name}}} 2011.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2010.png | [[:File:Karte Gemeinde {{{subject_name}}} 2010.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2009.png | [[:File:Karte Gemeinde {{{subject_name}}} 2009.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2008.png | [[:File:Karte Gemeinde {{{subject_name}}} 2008.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2007.png | [[:File:Karte Gemeinde {{{subject_name}}} 2007.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}}.png | [[:File:Karte Gemeinde {{{subject_name}}}.png {{!}}View map of {{{subject_name}}} ]] |<noinclude>x</noinclude> }} }} }} }} }} }} | [[:File:{{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2010.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2010.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2009.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2009.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2008.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2008.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2007.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2007.png | {{{map|Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}}.png}}} }} }} }} }} }}{{!}}View map of {{{subject_name}}} ]] }} |}

Both changes should address problems that were brought up after we changed the template recently. The original sandbox with the entire code is at Sandbox2, while the test cases are at testcases. Note that the errors on the Colombier template on the testcases page is to test incorrect SFOS numbers and is captured at Population data failures Tobyc75 (talk) 13:18, 26 April 2010 (UTC)[reply]

Seems to be all in order.  DoneTheDJ (talkcontribs) 13:54, 26 April 2010 (UTC)[reply]

Which one is right[edit]

Category:Former municipalities of Zürich or Category:Former municipalities of the canton of Zurich? Same problem with Fribourg, Lucerne, Solothurn, Vaud. We should keep one and delete the other.--2Neuenburg (talk) 17:58, 20 April 2010 (UTC)[reply]

Well, it looks like Fribourg, Geneva, Jura, Lucerne, Neuchatel, Schwyz, Solothurn, St. Gallen, Vaud, Zug and Zurich are all included in the Category:Former municipalities of xxx. Also, Bern used to have the strange Category:Former municipalities in Bern using in instead of of. I think that going to Category:Former municipalities of the canton of xxxxxx is a better idea, since many of the municipalities and the cantons share names. Making it clear that the former municipality is part of the canton, not a specific city is a good idea. Tobyc75 (talk) 18:11, 20 April 2010 (UTC)[reply]
Also, the template uses the same logical switch for both present and former municipalities, and they're all named Category:Municipalities of the canton of Zurich, not Category:Municipalities of Zürich. We should delete the latter.--2Neuenburg (talk) 18:23, 20 April 2010 (UTC)[reply]

Tschubby map links[edit]

On a related note, with the villages, the message

[[:File|view map of xxxx]]

is showing up if the village is not in the SFOS2Municipality template. Can you add something to hide this completely if it doesn't find a municipality name? We could try just using the village name, but some of these villages don't have any maps. See Feldmeilen and Irgenhausen for examples. Tobyc75 (talk) 12:25, 21 April 2010 (UTC)[reply]

I already noticed that and came up with a workaround of sorts (see Corticiasca) but this won't help with Feldmeilen or Irgenhausen because these probably were never communes. If my guess is right, they shouldn't be using this infobox in the first place! --2Neuenburg (talk) 15:34, 21 April 2010 (UTC)[reply]
Personally, I find the current "View map of <name>" link too large. I agree that the previous "zoom" link wasn't ideal either, but the Tschubby maps primarily locate a municipality next to its neighbors. As such, it might fit better with the list of neighboring municipalities. -- 签名 sig at 08:01, 22 April 2010 (UTC)[reply]
I've updated a test infobox to remove the [[:File|view map of xxxx]] message if no map is available and also added a line to allow for 2011 maps (for next year). The template is at Template:Infobox Swiss town/sandbox2 and the testcases are at testcases. This will help in the cases (rightly or wrongly) where a infobox article is added. I'm working on fixing the population problem. It might be best if the documentation just states that for villages, use either the most recent population from before the merger or 0. Tobyc75 (talk) 15:31, 23 April 2010 (UTC)[reply]

The error message n the infobox for Kempraten looks like a template error. Could someone look at this and correct it? --Stepheng3 (talk) 18:13, 22 April 2010 (UTC)[reply]

Ok, took care of it. Kempraten is a village that makes up part of the municipality of Rapperswil-Jona. Since statistics are usually only reported for municipalities, the villages are just listed with a 0 population or what ever population they had when they merged into a municipality. Let me know if you see any more like that. Tobyc75 (talk) 20:19, 22 April 2010 (UTC)[reply]
Thank you. I wonder if the infobox could be altered to fail more gracefully. --Stepheng3 (talk) 20:22, 22 April 2010 (UTC)[reply]

Another former town for which the municipality_code is blank, with the result that the {{Coord}} parameters have type:city({{{population}}}). Please modify the template so that it simply produces type:city in this circumstance. Also, instructions for finding municipality codes should be added to the template documentation. --Stepheng3 (talk) 23:48, 7 June 2010 (UTC)[reply]

What an unfriendly template! I went looking for the SFOS codes, but the links in the documentation were all redlinks. After I figured out where the category had got moved to, I fixed all the links I could find.
There was no entry for Wengen in the SFOS database, I guess because the municipality did not exist at the time of the census. Reading the template code, I discovered that the SFOS lookup was bypassed by municipality_type=former and I could specify population directly. Doing so broke the infobox, however, because area= was blank. Filling in area= resulted in an ugly glitch because population_of= was unspecified.
The template should be fixed so that it displays reasonable output for former municipalities even when parameters (including population=, area=, and population_of=) are blank or unspecified.--Stepheng3 (talk) 19:25, 9 June 2010 (UTC)[reply]

Edit request from Tobyc75, 15 June 2010[edit]

{{editprotected}} The following changes will fix some of the most common problems with the Infobox template. These problems occur when the municipality_code is incorrect or no longer valid or if the municipality_type is set to former. It fixes the broken population, population density and coord sections that occur in the proceeding cases.

I need to replace this section:

Extended content

 --Link catcher for separate CoA articles--
-->{{#ifexist:Coat of arms of {{{subject_name}}}|<br/>[[Coat of arms of {{{subject_name}}}|Details]]|{{#ifexist:Coat of arms of {{PAGENAME}}|<br/>[[Coat of arms of {{PAGENAME}}|Details]]}}}}
   {{!}}- class="mergedrow"
   {{!}}'''[[Cantons of Switzerland|Canton]]''' {{!!}} [[Canton of {{{canton|}}}|{{{canton}}}]]
   {{!}}- class="mergedrow"
   {{!}}'''[[Districts of Switzerland#Canton of {{{canton|}}}|District]]''' {{!!}} {{{district}}}
   {{#if:{{{within_municipality|<noinclude>x</noinclude>}}}|
   {{!}}- class="mergedrow"
   {{!}}'''[[List of municipalities of Switzerland|Municipality]]''' {{!!}} {{{within_municipality}}}}}
   {{!}}- class="mergedrow" 
   {{!}} colspan=2 style="text-align:center" {{!}}{{coord|{{{lat_d|{{{nd|0}}}}}}|{{{lat_m|{{{nm|0}}}}}}|N|{{{long_d|{{{ed|0}}}}}}|{{{long_m|{{{em|0}}}}}}|E|region:{{#if:{{{nd|}}}|CH|{{{iso-code-region}}}}}_type:city({{#ifeq:{{{municipality_type}}}|former|{{{population}}}|{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }})|display=inline,title}}
   {{!}}}
| <!-- If no CoA image given: use standard two columns -->
{{!}}- class="mergedtoprow"
{{!}} '''[[List of countries|Country]]''' {{!!}} [[Switzerland]]
{{!}}- class="mergedrow"
{{!}}'''[[Cantons of Switzerland|Canton]]''' {{!!}} [[Canton of {{{canton|}}}|{{{canton}}}]]
{{!}}- class="mergedrow"
{{!}}'''[[Districts of Switzerland#Canton of {{{canton|}}}|District]]''' {{!!}} {{{district}}}
{{#if:{{{within_municipality|<noinclude>x</noinclude>}}}|
{{!}}- class="mergedrow"
{{!}}'''[[List of municipalities of Switzerland|Municipality]]''' {{!!}} {{{within_municipality}}}}}
{{!}}- class="mergedbottomrow"
{{!}} style="vertical-align:middle;" {{!}} '''[[Geographical coordinates|Coordinates]]''' 
{{!}} style="vertical-align:middle;" {{!}} {{coord|{{{lat_d|{{{nd|0}}}}}}|{{{lat_m|{{{nm|0}}}}}}|N|{{{long_d|{{{ed|0}}}}}}|{{{long_m|{{{em|0}}}}}}|E|region:{{#if:{{{nd|}}}|CH|{{{iso-code-region}}}}}_type:city({{#ifeq:{{{municipality_type}}}|former|{{{population}}}|{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }})|display=inline,title}}
}}
|- class="mergedtoprow"
{{#if:{{{population|<noinclude>x</noinclude>}}}|
{{!}} '''[[Population]]'''{{!!}} {{#ifeq:{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A |{{formatnum:{{#expr: 0{{{population}}} }} }} ({{{populationof}}}) }}| {{formatnum:{{#expr: 0{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }} }} ({{#time: m/Y | {{Swiss populations date|{{{iso-code-region}}}|TIMESTAMP}} }}){{Swiss populations ref|{{{iso-code-region}}} }} }} }}
{{#if:{{{population|<noinclude>x</noinclude>}}}|
{{!}}- class="mergedrow"
{{!}}   - '''[[Population density#Human population density|Density]]'''{{!!}} {{#ifeq:{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A | {{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} | {{formatnum:{{#expr:{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} }}

with this code:

Extended content

 --Link catcher for separate CoA articles--
-->{{#ifexist:Coat of arms of {{{subject_name}}}|<br/>[[Coat of arms of {{{subject_name}}}|Details]]|{{#ifexist:Coat of arms of {{PAGENAME}}|<br/>[[Coat of arms of {{PAGENAME}}|Details]]}}}}
   {{!}}- class="mergedrow"
   {{!}}'''[[Cantons of Switzerland|Canton]]''' {{!!}} [[Canton of {{{canton|}}}|{{{canton}}}]]
   {{!}}- class="mergedrow"
   {{!}}'''[[Districts of Switzerland#Canton of {{{canton|}}}|District]]''' {{!!}} {{{district}}}
   {{#if:{{{within_municipality|<noinclude>x</noinclude>}}}|
   {{!}}- class="mergedrow"
   {{!}}'''[[List of municipalities of Switzerland|Municipality]]''' {{!!}} {{{within_municipality}}}}}
   {{!}}- class="mergedrow" 
   {{!}} colspan=2 style="text-align:center" {{!}}{{coord|{{{lat_d|{{{nd|0}}}}}}|{{{lat_m|{{{nm|0}}}}}}|N|{{{long_d|{{{ed|0}}}}}}|{{{long_m|{{{em|0}}}}}}|E|region:{{#if:{{{nd|}}}|CH|{{{iso-code-region}}}}}_type:city{{#iferror: {{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}||({{#ifeq:{{{municipality_type}}}|former|{{{population}}}|{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }}) }}|display=inline,title}}
   {{!}}}
| <!-- If no CoA image given: use standard two columns -->
{{!}}- class="mergedtoprow"
{{!}} '''[[List of countries|Country]]''' {{!!}} [[Switzerland]]
{{!}}- class="mergedrow"
{{!}}'''[[Cantons of Switzerland|Canton]]''' {{!!}} [[Canton of {{{canton|}}}|{{{canton}}}]]
{{!}}- class="mergedrow"
{{!}}'''[[Districts of Switzerland#Canton of {{{canton|}}}|District]]''' {{!!}} {{{district}}}
{{#if:{{{within_municipality|<noinclude>x</noinclude>}}}|
{{!}}- class="mergedrow"
{{!}}'''[[List of municipalities of Switzerland|Municipality]]''' {{!!}} {{{within_municipality}}}}}
{{!}}- class="mergedbottomrow"
{{!}} style="vertical-align:middle;" {{!}} '''[[Geographical coordinates|Coordinates]]''' 
{{!}} style="vertical-align:middle;" {{!}} {{coord|{{{lat_d|{{{nd|0}}}}}}|{{{lat_m|{{{nm|0}}}}}}|N|{{{long_d|{{{ed|0}}}}}}|{{{long_m|{{{em|0}}}}}}|E|region:{{#if:{{{nd|}}}|CH|{{{iso-code-region}}}}}_type:city{{#iferror: {{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}||({{#ifeq:{{{municipality_type}}}|former|{{{population}}}|{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }}) }}|display=inline,title}}
}}
|- class="mergedtoprow"
{{#if:{{{population|<noinclude>x</noinclude>}}}| 
{{!}} '''[[Population]]'''{{!!}} <!-- Tests for error messages from Swiss populations NC template -->{{#iferror: {{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}|<!-- If error=true, Tests for former municipality under municipality_type -->{{#ifeq:{{{municipality_type}}}|former|<!-- If error=true and municipality_type=former, tests for population = N/A -->{{#ifeq: N/A | {{{population}}} | N/A |{{formatnum:{{#expr: 0{{{population}}} }} }} ({{{populationof}}}) }}|<!-- If error=true and municipality_type is not former -->{{formatnum:{{#expr: 0{{{population}}} }} }} ({{{populationof}}}) }}|<!-- If error=false, tests if municipality_type is former -->{{#ifeq:{{{municipality_type}}}|former|<!-- If error=false and municipality_type=former, tests for population = N/A -->{{#ifeq: N/A | {{{population}}} | N/A |{{formatnum:{{#expr: 0{{{population}}} }} }} ({{{populationof}}}) }}|<!-- If error=false and municipality_type is not former, uses Swiss populations NC template --> {{formatnum:{{#expr: 0{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }} }} }} ({{#time: M Y | {{Swiss populations date|{{{iso-code-region}}}|TIMESTAMP}} }}){{Swiss populations ref|{{{iso-code-region}}} }} }} }} }}
{{#if:{{{population|<noinclude>x</noinclude>}}}|
{{!}}- class="mergedrow"
{{!}}   - '''[[Population density#Human population density|Density]]'''{{!!}} {{#iferror: {{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}|<!-- If error=true, Tests for former municipality under municipality_type -->{{#ifeq:{{{municipality_type}}}|former|<!-- If error=true and municipality_type=former, tests for population = N/A -->{{#ifeq: N/A | {{{population}}} | N/A |{{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}} }} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}} }} /sq mi) }}|{{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}} }} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}} }} /sq mi) }}|{{#ifeq:{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A | {{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} | {{formatnum:{{#expr:{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}*2.589988110336)div({{{area|1}}}) round 0}} }} /sq mi) }} }} }}

Tobyc75 (talk) 13:22, 15 June 2010 (UTC)[reply]

 Done here. Let me know if there are any problems. TFOWR 16:36, 16 June 2010 (UTC)[reply]
It looks like some extra text got left in when you moved the code. If you look at the diff, the bottom section
Extended content
{{{municipality_type}}}|former|{{#ifeq: N/A | {{{population}}} | N/A | {{formatnum:{{#expr:{{{population|0}}}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{{population|0}}}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} | {{formatnum:{{#expr:{{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}div{{{area|1}}} round 0}}}} /km<sup>2</sup> ({{formatnum:{{#expr:({{Swiss populations NC|{{{iso-code-region}}}|{{{municipality_code}}} }}*2.589988110336)div({{{area|1}}}) round 0}}}} /sq mi) }} }}

was retained from the earlier template. This is causing an error in the new template. Tobyc75 (talk) 17:49, 16 June 2010 (UTC)[reply]

Apologies for that: I've reverted the recent change, and reapplied. I checked Davos, but I'd be happier if you formally checked and OK'd the latest change. TFOWR 18:10, 16 June 2010 (UTC)[reply]
 Done looks good now. The template shouldn't break quite as easily now. It still can't handle missing a "population =" (though it just eliminates the field in the box) and I've adjusted the documentation to indicate that "population =" is required. One day soon I'll fix that as well. Tobyc75 (talk) 18:29, 16 June 2010 (UTC)[reply]

Proposed edit[edit]

I tried to add a collapsible map to the template, instead of just a bare link as it is now. You can see the results in the testcases: Template:Infobox Swiss town/testcases.--Ultimate Destiny (talk) 05:29, 5 October 2011 (UTC)[reply]

I like the way it looks with the collapsible map. It seems to pull the map up quickly and I like being able to see the map without leaving the article. Tobyc75 (talk) 19:42, 5 October 2011 (UTC)[reply]
Yes, it looks like an improvement to me. mgeo talk 09:23, 23 October 2011 (UTC)[reply]
Another edit proposal I implemented in the sandbox: fetching the area automatically by using the SFOS code (in the same way it currently works for the population).--Ultimate Destiny (talk) 10:02, 7 October 2011 (UTC)[reply]
This is definitely an improvement. I'm adding an edit request.--2Neuenburg (talk) 22:26, 14 November 2011 (UTC)[reply]
Please change
|- {{#if:{{{elevation|{{{altitude|<noinclude>x</noinclude>}}}}}} | class="mergedrow" | class="mergedbottomrow"}} {{#if: {{{area|<noinclude>x</noinclude>}}} | {{!}} '''Area''' {{#if: {{{area_source|}}}|{{{area_source|}}}}} {{!!}} {{convert|{{{area|0}}}|km2|abbr=on}} }} |- class="mergedrow" {{#if:{{{elevation|<noinclude>x</noinclude>}}}| {{!}}'''Elevation''' {{!!}} {{convert|{{{elevation|0}}}|m|ft|0|abbr=on}}{{#if: {{{elevation_description|}}}|<br>{{{elevation_description}}}|}} }}<!-- Added to enable viewing older versions of articles: -->{{#if:{{{altitude|}}}|{{!}}'''Elevation'''{{!!}}{{convert|{{{altitude|0}}}|m|ft|0|abbr=on}} [[File:Kuckucksuhr.JPG|9px|?]]{{#if: {{{altitude_description|}}}|<br>{{{altitude_description}}}|}} }} |- class="mergedrow" {{#if:{{{highest_m|<noinclude>x</noinclude>}}}| {{!}}   - Highest {{!!}} {{{highest_m|0}}} m - {{{highest|}}} }} |- class="mergedrow" {{#if:{{{lowest_m|<noinclude>x</noinclude>}}}| {{!}}   - Lowest {{!!}} {{{lowest_m|0}}} m - {{{lowest|}}} }} |- class="mergedtoprow" | '''[[Postal codes in Switzerland and Liechtenstein|Postal code]]''' || {{{postal_code}}} |- class="mergedrow" {{#if:{{{municipality_code|}}}|{{!}}'''[[Community Identification Number#Switzerland|SFOS number]]''' {{!!}} {{{municipality_code}}}}}<!-- Added to enable viewing older versions of articles: -->{{#if:{{{municipal_code|<noinclude>x</noinclude>}}}| {{!}}'''[[Community Identification Number#Switzerland|SFOS number]]''' {{!!}} {{{municipal_code}}} [[File:Kuckucksuhr.JPG|9px|?]]}} |- class="mergedrow" {{#if:{{{mayor|<noinclude>x</noinclude>}}}| {{!}}'''{{#if:{{{list_of_mayors|}}}|[[{{{list_of_mayors}}}|Mayor (list)]]|[[Mayor]]}}''' {{!!}} {{{mayor}}}{{#if: {{{mayor_asof|}}}| <small> (as of {{{mayor_asof}}})</small>|}} {{#if: {{{mayor_party|<noinclude>x</noinclude>}}}| <small> {{polparty|Switzerland|{{{mayor_party}}}}}</small>|}} }} |- class="mergedrow" {{#if:{{{demonym|<noinclude>x</noinclude>}}}| {{!}} '''<span style="font-size:90%">[[Demonym]]</span>''' {{!!}} <span style="font-size:90%">{{{demonym}}}</span> }} |- class="mergedrow" {{#if:{{{places|<noinclude>x</noinclude>}}}| {{!}} '''Localities''' {{!!}} {{{places}}} }} |- {{#if:{{{twintowns|}}}|class="mergedrow"|class="mergedbottomrow"}} {{#if:{{{neighboring_municipalities|<noinclude>x</noinclude>}}}| {{!}} '''Surrounded by''' {{!!}} {{{neighboring_municipalities}}} }} |- class="mergedrow" {{#if:{{{twintowns|<noinclude>x</noinclude>}}}| {{!}} '''[[List of twin towns and sister cities in Switzerland|Twin town]]s''' {{!!}} {{{twintowns}}} }} |- class="mergedbottomrow" {{!}} '''Website''' {{!!}} {{#if:{{{website|<noinclude>x</noinclude>}}}| [http://{{{website}}} {{{website}}}] | [http://{{{subject_name}}}.ch <span style="text-transform:lowercase;">{{{subject_name}}}</span>.ch] }} <span style="font-size:90%">{{#switch:{{{iso-code-region}}} |CH-LU=<br>[http://www.lustat.ch/gd_{{{municipality_code}}} Profile] {{de icon}}, |CH-NE=<br>[http://www.ne.ch/neat/documents/statistiques/Fiches_4829/wportraits_Files/NE{{{municipality_code}}}.pdf Profile] {{fr icon}}, |CH-TI=<br>[http://www.ti.ch/DFE/USTAT/DATI_COMUNI/0_pagine/default.asp?numero={{{municipality_code}}} Profile] {{it icon}}, |CH-VD=<br>[http://www.ucv.ch/communal/Co_Ucv.asp?NumStr=09.20&NoOFS={{{municipality_code}}}&Lng=E Profile], |CH-SH=<br>[http://www.statistik.sh.ch/index.php?id=10029&gem={{#switch:{{{subject_name}}}|Bargen=309|Beggingen=316|Beringen=310|Buch=319|Buchberg=311|Büttenhardt=304|Dörflingen=305|Gächlingen=300|Guntmadingen=301|Hallau=323|Hemishofen=320|Lohn=306|Löhningen=302|Merishausen=312|Neuhausen am Rheinfall=313|Neunkirch=303|Oberhallau=324|Ramsen=321|Rüdlingen=314|Schaffhausen=315|Schleitheim=317|Siblingen=318|Stein am Rhein=322|Stetten=307|Thayngen=308|Trasadingen=325|Wilchingen=326|309}} Profile] {{de icon}}, |<br>}} [http://www.bfs.admin.ch/bfs/portal/en/index/regionen/regionalportraets/gemeindesuche.html?geographyID={{{municipality_code}}}&FormEncoding=UTF-8 SFSO statistics]</span> |- ! colspan=2 align=center | {{Location map|Switzerland|float=left|width=265 |label={{{subject_name}}} |lat={{#expr:{{{lat_d|0}}}+{{{lat_m|0}}}/60}}|long={{#expr:{{{long_d|0}}}+{{{long_m|0}}}/60}}|position={{#if:{{{position|<noinclude>x</noinclude>}}}|{{{position}}}}}|caption=}} |- ! colspan=2 align=center | {{#ifeq:{{{municipality_type}}}|former| {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2011.png | [[:File:Karte Gemeinde {{{subject_name}}} 2011.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2010.png | [[:File:Karte Gemeinde {{{subject_name}}} 2010.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2009.png | [[:File:Karte Gemeinde {{{subject_name}}} 2009.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2008.png | [[:File:Karte Gemeinde {{{subject_name}}} 2008.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2007.png | [[:File:Karte Gemeinde {{{subject_name}}} 2007.png {{!}}View map of {{{subject_name}}} ]] | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}}.png | [[:File:Karte Gemeinde {{{subject_name}}}.png {{!}}View map of {{{subject_name}}} ]] |<noinclude>x</noinclude> }} }} }} }} }} }} | [[:File:{{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2010.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2010.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2009.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2009.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2008.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2008.png | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2007.png | Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2007.png | {{{map|Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}}.png}}} }} }} }} }} }}{{!}}View map of {{{subject_name}}} ]] }} |}<!-- Categories -->{{#if:{{NAMESPACE}}||{{#switch: {{{iso-code-region}}} | CH-FR | CH-GE | CH-JU | CH-LU | CH-NE | CH-SZ | CH-SO | CH-SG | CH-VD | CH-ZG | CH-ZH = {{#ifeq:{{{municipality_type}}}|former|[[Category:Villages in the canton of {{{canton}}}]] [[Category:Former municipalities of the canton of {{{canton}}}]] | {{#ifeq:{{{municipality_type}}}|village|[[Category:Villages in the canton of {{{canton}}}]] | [[Category:Municipalities of the canton of {{{canton}}}]][[Category:Municipalities of Switzerland]]}}}} | #default = {{#ifeq:{{{municipality_type}}}|former|[[Category:Villages in {{{canton}}}]] [[Category:Former municipalities of {{{canton}}}]] | {{#ifeq:{{{municipality_type}}}|village|[[Category:Villages in {{{canton}}}]] }} [[Category:Municipalities of {{{canton}}}]][[Category:Municipalities of Switzerland]]}} }} }}</includeonly><noinclude> {{Documentation}} </noinclude>
into:
|- {{#if:{{{elevation|{{{altitude|<noinclude>x</noinclude>}}}}}} | class="mergedrow" | class="mergedbottomrow"}} {{!}} '''Area''' {{#if: {{{area_source|}}}|{{{area_source|}}}}} {{!!}}<!-- Tests for error messages from Swiss area template -->{{#iferror: {{Swiss area data|{{{municipality_code}}} }}|<!-- If error=true, use the area parameter --> {{convert|{{{area|0}}}|km2|abbr=on}} |<!-- If error=false, tests if municipality_type is former -->{{#ifeq:{{{municipality_type}}}|former| {{convert|{{{area|0}}}|km2|abbr=on}} |<!-- If error=false and municipality_type is not former, uses Swiss area template --> {{convert|{{Swiss area data|{{{municipality_code}}} }}|ha|km2|disp=output only|abbr=on}} ({{convert|{{Swiss area data|{{{municipality_code}}} }}|ha|sqmi|disp=output only|abbr=on}}){{Swiss area data||QUELLE}} }} }} |- class="mergedrow" {{#if:{{{elevation|<noinclude>x</noinclude>}}}| {{!}}'''Elevation''' {{!!}} {{convert|{{{elevation|0}}}|m|ft|0|abbr=on}}{{#if: {{{elevation_description|}}}|<br>{{{elevation_description}}}|}} }}<!-- Added to enable viewing older versions of articles: -->{{#if:{{{altitude|}}}|{{!}}'''Elevation'''{{!!}}{{convert|{{{altitude|0}}}|m|ft|0|abbr=on}} [[File:Kuckucksuhr.JPG|9px|?]]{{#if: {{{altitude_description|}}}|<br>{{{altitude_description}}}|}} }} |- class="mergedrow" {{#if:{{{highest_m|<noinclude>x</noinclude>}}}| {{!}}   - Highest {{!!}} {{{highest_m|0}}} m - {{{highest|}}} }} |- class="mergedrow" {{#if:{{{lowest_m|<noinclude>x</noinclude>}}}| {{!}}   - Lowest {{!!}} {{{lowest_m|0}}} m - {{{lowest|}}} }} |- class="mergedtoprow" | '''[[Postal codes in Switzerland and Liechtenstein|Postal code]]''' || {{{postal_code}}} |- class="mergedrow" {{#if:{{{municipality_code|}}}|{{!}}'''[[Community Identification Number#Switzerland|SFOS number]]''' {{!!}} {{{municipality_code}}}}}<!-- Added to enable viewing older versions of articles: -->{{#if:{{{municipal_code|<noinclude>x</noinclude>}}}| {{!}}'''[[Community Identification Number#Switzerland|SFOS number]]''' {{!!}} {{{municipal_code}}} [[File:Kuckucksuhr.JPG|9px|?]]}} |- class="mergedrow" {{#if:{{{mayor|<noinclude>x</noinclude>}}}| {{!}}'''{{#if:{{{list_of_mayors|}}}|[[{{{list_of_mayors}}}|Mayor (list)]]|[[Mayor]]}}''' {{!!}} {{{mayor}}}{{#if: {{{mayor_asof|}}}| <small> (as of {{{mayor_asof}}})</small>|}} {{#if: {{{mayor_party|<noinclude>x</noinclude>}}}| <small> {{polparty|Switzerland|{{{mayor_party}}}}}</small>|}} }} |- class="mergedrow" {{#if:{{{demonym|<noinclude>x</noinclude>}}}| {{!}} '''<span style="font-size:90%">[[Demonym]]</span>''' {{!!}} <span style="font-size:90%">{{{demonym}}}</span> }} |- class="mergedrow" {{#if:{{{places|<noinclude>x</noinclude>}}}| {{!}} '''Localities''' {{!!}} {{{places}}} }} |- {{#if:{{{twintowns|}}}|class="mergedrow"|class="mergedbottomrow"}} {{#if:{{{neighboring_municipalities|<noinclude>x</noinclude>}}}| {{!}} '''Surrounded by''' {{!!}} {{{neighboring_municipalities}}} }} |- class="mergedrow" {{#if:{{{twintowns|<noinclude>x</noinclude>}}}| {{!}} '''[[List of twin towns and sister cities in Switzerland|Twin town]]s''' {{!!}} {{{twintowns}}} }} |- class="mergedbottomrow" {{!}} '''Website''' {{!!}} {{#if:{{{website|<noinclude>x</noinclude>}}}| [http://{{{website}}} {{{website}}}] | [http://{{{subject_name}}}.ch <span style="text-transform:lowercase;">{{{subject_name}}}</span>.ch] }} <span style="font-size:90%">{{#switch:{{{iso-code-region}}} |CH-LU=<br>[http://www.lustat.ch/gd_{{{municipality_code}}} Profile] {{de icon}}, |CH-NE=<br>[http://www.ne.ch/neat/documents/statistiques/Fiches_4829/wportraits_Files/NE{{{municipality_code}}}.pdf Profile] {{fr icon}}, |CH-TI=<br>[http://www.ti.ch/DFE/USTAT/DATI_COMUNI/0_pagine/default.asp?numero={{{municipality_code}}} Profile] {{it icon}}, |CH-VD=<br>[http://www.ucv.ch/communal/Co_Ucv.asp?NumStr=09.20&NoOFS={{{municipality_code}}}&Lng=E Profile], |CH-SH=<br>[http://www.statistik.sh.ch/index.php?id=10029&gem={{#switch:{{{subject_name}}}|Bargen=309|Beggingen=316|Beringen=310|Buch=319|Buchberg=311|Büttenhardt=304|Dörflingen=305|Gächlingen=300|Guntmadingen=301|Hallau=323|Hemishofen=320|Lohn=306|Löhningen=302|Merishausen=312|Neuhausen am Rheinfall=313|Neunkirch=303|Oberhallau=324|Ramsen=321|Rüdlingen=314|Schaffhausen=315|Schleitheim=317|Siblingen=318|Stein am Rhein=322|Stetten=307|Thayngen=308|Trasadingen=325|Wilchingen=326|309}} Profile] {{de icon}}, |<br>}} [http://www.bfs.admin.ch/bfs/portal/en/index/regionen/regionalportraets/gemeindesuche.html?geographyID={{{municipality_code}}}&FormEncoding=UTF-8 SFSO statistics]</span> |- ! colspan=2 align=center | {{Location map|Switzerland|float=left|width=265 |label={{{subject_name}}} |lat={{#expr:{{{lat_d|0}}}+{{{lat_m|0}}}/60}}|long={{#expr:{{{long_d|0}}}+{{{long_m|0}}}/60}}|position={{#if:{{{position|<noinclude>x</noinclude>}}}|{{{position}}}}}|caption=}} |- ! colspan=2 align=center | {{#ifeq:{{{municipality_type}}}|former| {{hidden | header = Map of {{{subject_name}}} | headercss=height:5px; | content = <br/>[[File:Karte Gemeinde {{{subject_name}}} {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2011.png | 2011 | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2010.png | 2010 | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2009.png | 2009 | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2008.png | 2008 | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}} 2007.png | 2007 | {{#ifexist: Media:Karte Gemeinde {{{subject_name}}}.png | }} }} }} }} }} }}.png|250px]] }} | {{hidden | header = Map of {{{subject_name}}} | headercss=height:5px; | content = <br/>[[File:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | 2011 | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2010.png | 2010 | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2009.png | 2009 | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2008.png | 2008 | {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2007.png | 2007 | {{{map|Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} }}} }} }} }} }} }}.png{{!}}250px]] }} }} |}<!-- Categories -->{{#if:{{NAMESPACE}}||{{#switch: {{{iso-code-region}}} | CH-FR | CH-GE | CH-JU | CH-LU | CH-NE | CH-SZ | CH-SO | CH-SG | CH-VD | CH-ZG | CH-ZH = {{#ifeq:{{{municipality_type}}}|former|[[Category:Villages in the canton of {{{canton}}}]] [[Category:Former municipalities of the canton of {{{canton}}}]] | {{#ifeq:{{{municipality_type}}}|village|[[Category:Villages in the canton of {{{canton}}}]] | [[Category:Municipalities of the canton of {{{canton}}}]][[Category:Municipalities of Switzerland]]}}}} | #default = {{#ifeq:{{{municipality_type}}}|former|[[Category:Villages in {{{canton}}}]] [[Category:Former municipalities of {{{canton}}}]] | {{#ifeq:{{{municipality_type}}}|village|[[Category:Villages in {{{canton}}}]] }} [[Category:Municipalities of {{{canton}}}]][[Category:Municipalities of Switzerland]]}} }} }}</includeonly><noinclude> {{Documentation}}
The sandbox version includes the links that were removed after the comment below. Does this final version include wikilinks to things like Population, etc? Tobyc75 (talk) 22:40, 16 November 2011 (UTC)[reply]
I think I've fixed them all, so not any more.--2Neuenburg (talk) 23:17, 16 November 2011 (UTC)[reply]

 Done, I've made the above requested change. If there any issues, message me. Blurpeace 00:17, 21 November 2011 (UTC)[reply]

Actually, it looks like the best version is at the Sandbox.Tobyc75 (talk) 17:17, 21 November 2011 (UTC)[reply]
something went wrong, see Zinal. Frietjes (talk) 23:47, 22 November 2011 (UTC)[reply]
Thanks for pointing that out. Zinal is a village, so it doesn't have an official area like municipalities do. But we need to adjust the code of the infobox to make it fail more gracefully.Tobyc75 (talk) 13:54, 23 November 2011 (UTC)[reply]

If anything still needs changing, please make the changes to the sandbox template and reactivate. Thanks — Martin (MSGJ · talk) 12:54, 25 November 2011 (UTC)[reply]

Removing superfluous links[edit]

Several subheadings in this template are linked unnecessarily, per WP:OVERLINK, as they are widely understood concepts, or are linked in ways that a reader would not expect. Please remove the links for:

Please also simplify the 'Postal code' link by piping it directly to Postal codes in Switzerland and Liechtenstein instead of via the Postal code (Switzerland) redirect. Colonies Chris (talk) 17:42, 1 November 2011 (UTC)[reply]

Done. Plastikspork ―Œ(talk) 00:44, 3 November 2011 (UTC)[reply]
Thanks. Colonies Chris (talk) 09:34, 3 November 2011 (UTC)[reply]

Snow image[edit]

Actually the snow image is displayed the first six month of the year. My suggestion would be to display it only and precisely during the winter months, therefore from December 21 to March 21. I had a look at the commons categories "April in Switzerland" [1] and it doesn't seem there is still a lot of snow in this period of the year (and obviously it doesn't get better in May and June), so I think the standard (snow free) image would be preferable during the Spring months. And of course, a nice winter picture during the year-end festivities wouldn't hurt. mgeo talk 18:25, 4 December 2011 (UTC)[reply]

Note: Unfortunately, I don't know how to edit this template to make the change I proposed above. So if someone could help, that would be greatly appreciated. mgeo talk 23:06, 3 January 2012 (UTC)[reply]

Edit request on 20 December 2011[edit]

This template does not allow geographic coordinates to be entered in degrees, minutes and seconds, only degrees and minutes. This makes for imprecise locations on the geohack website. This seems to be the case with many other templates, and I'm wondering if Wikipedia would be able to change this to allow the addition of seconds to the coordinates of this page and all other Switzerland municipalities who use this template. Thank you! Dhuling43 (talk) 21:44, 20 December 2011 (UTC)[reply]

Are seconds too precise? Since 1" is only about 30m would adding seconds create an unrealistically precise location for a municipality that may cover several to many square km? Tobyc75 (talk) 13:20, 21 December 2011 (UTC)[reply]
Well considering several sites pull from wikipedia, i think its prudent to be as precise as possible, especially when you have villages separated by no more than a few wheat fields, or even less. Accurate coordinates are crucial, and i feel like adding seconds to the template wouldn't be that hard, but I'll admit I'm somewhat ignorant on the workings of the template system. DMS seems the best, or decimal would be great as well. Dhuling43 (talk) 18:19, 22 December 2011 (UTC)[reply]
Ok, then we need to specify where you'll be getting the more precise coordinates. The center of the largest village? The geographical center of the municipal area (which can be as large as more than 100 sq km)? Town hall? Some one's house? To precise is at least as bad as too broad. Tobyc75 (talk) 12:31, 29 December 2011 (UTC)[reply]
Deactivated the edit protected request; please specify the exact change(s)—character for character—that you wish to make to the template. It may be easier to create a subpage of the template for doing so, if you'd like. --slakrtalk / 06:52, 29 December 2011 (UTC)[reply]
Use a decimal fraction of the minute to achieve arbitrary precision. Bonzon (talk) 19:51, 29 April 2013 (UTC)[reply]

Edit request on 3 January 2012[edit]

I need this page unlocked so I can add a line to search for 2012 maps for the infobox. Thanks

Tobyc75 (talk) 13:04, 3 January 2012 (UTC)[reply]

Not done: requests for changes to the page protection level should be made at Wikipedia:Requests for page protection. Anomie 20:43, 3 January 2012 (UTC)[reply]
Actually I just need a temporary unprotect so I can make a few changes to the infobox. The notice board says, under Current requests for edits to a protected page, "Ideally requests should be made on the article talk page rather than here" Tobyc75 (talk) 21:03, 3 January 2012 (UTC)[reply]
You need to explain what you want to change, then an admin will edit the template for you (if it's a good idea). — Bility (talk) 22:39, 3 January 2012 (UTC)[reply]
Ok, I really could have done this easily. What the modification does is search for the newest version (2012 & 2013) of municipal maps. I just copied the entire template over to the sandbox and then edited it to a new version. Checked out the new version with the newest municipality and everything looks good. Please just copy the sandbox version over completely. Thanks Tobyc75 (talk) 23:43, 3 January 2012 (UTC)[reply]
 Done Happymelon 12:08, 6 January 2012 (UTC)[reply]

Category changes[edit]

The following changes:

...have been passed by CFD. Is anyone able to adjust the template to automatically move the entries in the categories populated by this template? Timrollpickering (talk) 19:16, 25 January 2012 (UTC)[reply]

Need unprotect to update website address[edit]

The Swiss Federal Statistical Office has recently changed some of the weblinks on their website. This means that the SFSO statistics link is no longer valid. The sandbox version has a new weblink added. Can you please copy the sandbox version over to the main. Thanks Tobyc75 (talk) 20:41, 11 May 2012 (UTC)[reply]

Done  Sandstein  20:59, 11 May 2012 (UTC)[reply]

Suggested change "Map of X" -> "Location of X"[edit]

The (hidden by default) maps that show the location of a town are titled "Map of X". I propose this title to be changed to "Location of X". Jjgw (talk) 15:48, 23 May 2012 (UTC)[reply]

I agree with Jjgw. For example the map displayed in the Zurich infobox shows where Zurich is located in the region but practically nothing of the city proper (such as streets, landmarks etc.) and this is the case for every municipality. So "Location of X" seems more appropriate here. mgeo talk 19:26, 27 May 2012 (UTC)[reply]
 Done — Martin (MSGJ · talk) 13:35, 30 May 2012 (UTC)[reply]

Coding syntax fault?[edit]

It seem that something in this template adds some articles to Category:Articles with missing files. Template coding is beyond my capabilities so can someone see what is causing it? Cheers. -- Alan Liefting (talk - contribs) 06:58, 11 September 2012 (UTC)[reply]

The category isn't generated by the infobox template, but is a MediaWiki feature caused by the presence of a redlinked image. You don't give any specific examples, but Aquila, Switzerland is one such page. If you look at the bottom of the infobox, there is a row "Location of Aquila" with a [show] link - click that, and the redlink is revealed. It's apparently expecting an image named File:Karte Gemeinde Aquila .png (note the presence of a space before the .png), but this is not the whole story. This is the last fallback when various other images have been tried, but have been found to also be non-existent. The infobox uses several parameters to conjure up an image name, these are |municipality_type= |subject_name= |municipality_code= (which is pushed through {{SFOS2Municipality}}) and |map=. I wouldn't like to describe the hoops that are jumped through in order to do this, but for the specific case of Aquila, Switzerland which has |municipality_type=former and |subject_name=Aquila, it's expecting any one of eight files to exist (these are File:Karte Gemeinde Aquila 2013.png; File:Karte Gemeinde Aquila 2012.png; File:Karte Gemeinde Aquila 2011.png; File:Karte Gemeinde Aquila 2010.png; File:Karte Gemeinde Aquila 2009.png; File:Karte Gemeinde Aquila 2008.png; File:Karte Gemeinde Aquila 2007.png; File:Karte Gemeinde Aquila .png), and in the absence of all of these, you get a redlink in the final page and therefore Category:Articles with missing files. However, File:Karte Gemeinde Aquila.png (with no space before the .png) does exist, so perhaps we need additional code to look for that. --Redrose64 (talk) 10:25, 11 September 2012 (UTC)[reply]
It sounds like the code is overly complicated for the process of adding images. -- Alan Liefting (talk - contribs) 19:13, 11 September 2012 (UTC)[reply]
The syntax was written like this to search for the most current map of the municipality. Since the maps are updated only for the communities that changed borders in that year, there are a lot of possible map names. It looks like we just need to make a small addition to the code to search for the file name without a space.Tobyc75 (talk) 19:33, 11 September 2012 (UTC)[reply]
Yes. Have a look at Template:Infobox Swiss town/testcases#Aquila, Switzerland; don't worry about the different widths or the size of the pushpin map, but go for the [show] links at the bottom of each infobox. --Redrose64 (talk) 19:34, 11 September 2012 (UTC)[reply]
It looks like the syntax with a space before .png is incorrect. Looking around on commons I can't see any files that have the space.Tobyc75 (talk) 20:01, 11 September 2012 (UTC)[reply]
Done I've amended it to suppress that space, and Category:Articles with missing files is already shrinking. --Redrose64 (talk) 22:15, 11 September 2012 (UTC)[reply]

Here are some more: Zinal, Zimmerwald. -- Alan Liefting (talk - contribs) 09:24, 21 September 2012 (UTC)[reply]

Neither of those articles have a map, which is causing this problem. They are both villages and so the infobox is looking for them by name. It needs to be rewritten to use the map field if nothing shows up automatically and to leave the map image blank if no map exists.Tobyc75 (talk) 19:42, 21 September 2012 (UTC)[reply]

I've rewritten the code in the sandbox to make it a bit more flexible and to create an image for the failure case. It now looks for images by the municipality_code field, then the map field, then the municipality_name field then if none of those work, it displays the No map.png image. This will prevent errors when the infobox can't find an image and makes it more flexible. I've tried it on a number of articles and haven't found any problems so far. I'll make sure the rest of the sandbox section matches so that the entire sandbox version can just be copied over. Tobyc75 (talk) 20:44, 21 September 2012 (UTC)[reply]

Do we actually need such overly complicated code just to find a file which is normally something that does not change? Also, I strongly object to the use of a placeholder map. If there is no map there is no need to display a dummy image. Placeholders are generally frowned upon. Have a read of WP:PLACEHOLDER for example. -- Alan Liefting (talk - contribs) 20:59, 21 September 2012 (UTC)[reply]
Actually some of the maps change every year and in an inconsistent manner. As for the place holder image, I don't really care, it just needs to fail gracefully and not by searching for an image that doesn't exist. I can't figure out a way to make the template just blank that section if the image doesn't exist, so if you can, have at it. If not, then maybe a blank section (which I think would be really confusing) or maybe text saying that no image exists.Tobyc75 (talk) 22:49, 21 September 2012 (UTC)[reply]
Another way, and I think this was used for some Christianity related files, is to have a File:Map of this place (current version).svg. -- Alan Liefting (talk - contribs) 22:54, 21 September 2012 (UTC)[reply]
I'm not really following what you mean. Are you talking about renaming the files on Commons or something else? There are a few villages that use the infobox template, but there are no maps for that village, which is causing the failures that the placeholder image was meant to address.Tobyc75 (talk) 23:27, 21 September 2012 (UTC)[reply]
Sorry, I was thinking that files were getting deleted on Commons. What I was saying does not apply if there is no image at all. -- Alan Liefting (talk - contribs) 00:04, 22 September 2012 (UTC)[reply]
Ok, that makes it clear. So would you prefer an image or text for those cases where no map exists (because the village doesn't really have defined borders, unlike municipalities)? Tobyc75 (talk) 01:11, 22 September 2012 (UTC)[reply]
I want a solution that prevents the appearance of a red link. -- Alan Liefting (talk - contribs) 04:59, 22 September 2012 (UTC)[reply]
Ok, I've rewritten the sandbox version to display a text message if the template fails to find any files. The template now also checks the map= parameter which wasn't happening before. The new sandbox version is flexible and should eliminate any missing image problems. Can I get this sandbox version copied over to the working version? Tobyc75 (talk) 20:01, 24 September 2012 (UTC)[reply]

Layout[edit]

The current infobox doesn't look great at all. The picture doesn't fit the infobox and the image caption is too big and separated from the picture (see Zurich and Washington, D.C. for examples). I think it was better before. mgeo talk 22:17, 23 September 2012 (UTC)[reply]

Edit request[edit]

Could someone make the several following changes (apparently uncontroversial):

  • Larger lead picture, larger font size for the title, smaller font size for the caption and no separation between the picture and the caption (same way as Template:Infobox settlement, see for example Bern and Bangor, Maine).
  • Snow image is currently displayed for the first six three months of the year, this should be changed for the winter months only (21 December to 21 March)

Thanks. mgeo talk 08:29, 7 December 2012 (UTC)[reply]

Not done: please be more specific about what needs to be changed. Preferably supply the exact code or a sandbox copy.  Sandstein  16:41, 11 December 2012 (UTC)[reply]
Ok, you will find the code in the sandbox. You can also check the result here. I didn't implement the change for the winter picture but I just noticed it is displayed only for the first 3 months of the year so I think I can live with that for the moment (will see later how to implement the code though). mgeo talk 13:49, 12 December 2012 (UTC)[reply]
Done. Nyttend (talk) 13:49, 18 December 2012 (UTC)[reply]

Explicitly set empty website[edit]

Some small towns don't have an official website. Yes, this still exists. Take Mont-Tramelan; mont-tramelan.ch does not exist. Showing dead links to users is not a very good experience. Can you add functionality for explicitly specifying no website? Bonzon (talk) 19:51, 29 April 2013 (UTC)[reply]

Mayor_asof[edit]

Hello.

When parameter mayor_asof is filled in, it appears adjacent to the mayor's name. Example from Yverdon-les-Bains:

Daniel Von Siebenthal(as of 2009)

Does not look good.

Can someone please insert a space?

Thanks.

HandsomeFella (talk) 17:25, 12 May 2013 (UTC)[reply]

Done --Redrose64 (talk) 18:21, 12 May 2013 (UTC)[reply]

Wrapper[edit]

Per discussion at Wikipedia:Templates for discussion/Log/2013 June 29#Template:Infobox Swiss town, we should now make this template a wrapper for {{Infobox settlement}} (the latter is about to be converted to use {{infobox}}). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:46, 10 July 2013 (UTC)[reply]

The outcome of that discussions was "There appear to be no serious objections to rewriting the template to use {{infobox settlement}}, but as was mentioned below, that can be discussed on the talk page". Rewriting it wasn't mandated. --AussieLegend () 10:53, 10 July 2013 (UTC)[reply]
That's why I said "we should", not "we must". Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:48, 10 July 2013 (UTC)[reply]

Comments, anyone? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:34, 17 August 2013 (UTC)[reply]

I think it's better to renominate the template again, project pages don't get much attention.--eh bien mon prince (talk) 06:37, 21 August 2013 (UTC)[reply]
What purpose would that serve? The outcome would likely be another referral back here to discuss the matter. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:45, 21 August 2013 (UTC)[reply]
Well, this discussion about the wrapper was created more than a month ago, and there has been only one comment from other users so far (two with mine). Most people simply won't come across this discussion, since it's in a template talk page. And unlike last time, now there is actually a working wrapper in the sandbox, so I think a decision could be made at TfD.--eh bien mon prince (talk) 14:42, 21 August 2013 (UTC)[reply]
No need, if there's a working wrapper in the sandbox (you refer to this version, since overwritten, I presume), and no objections, it can be copied across by any admin; either a regular here, or we can flag one down by using {{Editprotected}}. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:04, 21 August 2013 (UTC)[reply]
Actually I mean the version in the sandbox 2, from the testcases and a couple of pages I tried it seems to work well enough. So I support its implementation, either through the editprotected template or by an admin.--eh bien mon prince (talk) 15:28, 21 August 2013 (UTC)[reply]

Oppose this attempt to completely redo the template. The TFD discussion ended without a consensus for changing the template and it is incorrect to pretend that these changes are a given. The argument that this wrapper is smaller, while technically true, is a red herring. While it is only 5K, it calls another 3K template and the 42K Infobox Settlement template. The current template is only 15K! Additionally, there's this Infobox Swiss town former template. The current template handles former municipalities with a single line. The proposal seems to be to have 2 separate templates, one for current municipalities and one for former municipalities. As I commented below, this more than doubles the amount of maintenance and means that the templates are likely to slowly change appearance as changes are made to one but the not the other and they drift away from each other. I would support a change if it actually made things easier or more efficient, but these changes make it more complex, harder and less efficient.Tobyc75 (talk) 11:49, 23 August 2013 (UTC)[reply]

Given your reservations about changing the template, I renew my proposal to discuss the changes at TfD, since very few people will notice the discussion here.
About the issues you raise: performance-wise, I did a few tests by loading the same page with the current version and the sandbox version, and I didn't notice any difference between them, even if the sandbox version calls IS they have the same loading times.--eh bien mon prince (talk) 03:13, 25 August 2013 (UTC)[reply]
The last TfD was only closed on 29 June, with the suggestion that it be discussed on the template's talk page. You can't keep going back to TfD until you get the solution that you desire. If people aren't joining the conversation, then the correct process is to advertise it at relevant project pages and, in the event that doesn't work, you can always open an RfC here. --AussieLegend () 04:35, 25 August 2013 (UTC)[reply]
"You can't keep going back to TfD until you get the solution that you desire": that's a nonsensical and patently false accusation, I didn't even take part to the previous discussion. Avoid similar attacks in the future.--eh bien mon prince (talk) 14:16, 25 August 2013 (UTC)[reply]
That you didn't participate in the discussion is irrelevant. There are always people who didn't participate in a TfD. We don't reopen TfDs because one person missed the opportunity to discuss. The template has already been to TfD twice and, as Pigsonthewing has already pointed out, the outcome of another TfD "would likely be another referral back here to discuss the matter". --AussieLegend () 14:38, 25 August 2013 (UTC)[reply]
You seem unable to understand - I didn't ask to reopen the TfD, I told you to not misinterpret my intentions. Maybe you're in the habit of asking a vote on the same matter over and over hoping you'll eventually get your way, but I'm not. You made that claim, it was false, and I called you on it.--eh bien mon prince (talk) 15:54, 25 August 2013 (UTC)[reply]
No, you didn't ask to reopen the TfD, you asked for a whole new one, which is essentially the same thing. --AussieLegend () 16:32, 25 August 2013 (UTC)[reply]
If you think it wiser to ask at RfC you should try that. My only interest is in eliciting a few comments from the wider community.--eh bien mon prince (talk) 16:48, 25 August 2013 (UTC)[reply]
The TfD closed with the summary: The result of the discussion was no consensus to delete. There appear to be no serious objections to rewriting the template to use {{infobox settlement}}, but as was mentioned below, that can be discussed on the talk page. The proposal is for one template; and will improve efficiency by reducing the maintenance overhead. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:09, 25 August 2013 (UTC)[reply]
Yes, I've already pointed that out above. However, there was opposition to its deletion in lieu of IS, so that needs to be discussed. There's also the matter of the extra template, {{Infobox Swiss town former}}, which is largely redundant to this template, as discussed below. --AussieLegend () 14:38, 25 August 2013 (UTC)[reply]

Best practice for deprecated postal codes for former municipalities?[edit]

Seiry, a former municipality, also had its postal code replaced at one point. I don't believe the old one, currently showing in the infobox, is currently in use by the post, but 1474 no longer is the postal code through which to reach inhabitants of the village. Should it be updated to the current one (which shows correctly on the parent municipality) or is there a historical reason to keep the old one? Thanks, MLauba (Talk) 21:49, 29 August 2013 (UTC)[reply]

I think it's best to update it. I don't know if postal codes are reassigned, but an unused postal code is not something anyone would find useful.--eh bien mon prince (talk) 06:11, 30 August 2013 (UTC)[reply]
Thought as much but you never know. MLauba (Talk) 06:30, 30 August 2013 (UTC)[reply]