Template talk:Infobox Switzerland municipality/Archive 3

Pictures with snow in summer
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
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 template, which will silently link the pages concerned to [&#91;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 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)


 * After some considerable fiddling with messy parser functions I managed to get 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)

Former municipalities
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
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)

Improvements
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)


 * 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)

Edit protection
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)
 * Can you please describe the changes you are making? &mdash; Martin (MSGJ · talk) 06:48, 20 April 2010 (UTC)
 * 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)
 * 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. &mdash; Martin (MSGJ · talk) 10:21, 20 April 2010 (UTC)
 * 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)
 * As long as it will be done reasonably quickly, it's good enough for me. ✅ &mdash; Martin (MSGJ · talk) 11:47, 20 April 2010 (UTC)
 * 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)


 * 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)

Template:Infobox Swiss town 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


 * - class="mergedtoprow"

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

! colspan=2 align=center |
 * }

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)
 * Seems to be all in order. ✅ —Th e DJ (talk • contribs) 13:54, 26 April 2010 (UTC)

Which one is right
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)
 * 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)
 * 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)

Tschubby map links
On a related note, with the villages, the message 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)
 * 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)
 * Personally, I find the current "View map of " 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)


 * I've updated a test infobox to remove the  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)

Kempraten
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)
 * 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)
 * Thank you. I wonder if the infobox could be altered to fail more gracefully. --Stepheng3 (talk) 20:22, 22 April 2010 (UTC)

Wengen
Another former town for which the municipality_code is blank, with the result that the Coord parameters have. Please modify the template so that it simply produces  in this circumstance. Also, instructions for finding municipality codes should be added to the template documentation. --Stepheng3 (talk) 23:48, 7 June 2010 (UTC)
 * 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)

Edit request from Tobyc75, 15 June 2010
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:

--Link catcher for separate CoA articles-- -->  |- class="mergedrow" |Canton Canton of |- class="mergedrow" |District |- class="mergedrow" | colspan=2 style="text-align:center" |°N, °W |}
 * - class="mergedtoprow"
 * Country Switzerland
 * - class="mergedrow"
 * Canton Canton of
 * - class="mergedrow"
 * District
 * District

}}
 * - class="mergedbottomrow"
 * style="vertical-align:middle;" | Coordinates
 * style="vertical-align:middle;" | °N, °W
 * - class="mergedtoprow"

with this code:

--Link catcher for separate CoA articles-- -->  |- class="mergedrow" |Canton Canton of |- class="mergedrow" |District |- class="mergedrow" | colspan=2 style="text-align:center" |°N, °W |}
 * - class="mergedtoprow"
 * Country Switzerland
 * - class="mergedrow"
 * Canton Canton of
 * - class="mergedrow"
 * District
 * District

}}
 * - class="mergedbottomrow"
 * style="vertical-align:middle;" | Coordinates
 * style="vertical-align:middle;" | °N, °W
 * - class="mergedtoprow"

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


 * ✅ here. Let me know if there are any problems. TFOWR 16:36, 16 June 2010 (UTC)


 * It looks like some extra text got left in when you moved the code. If you look at the diff, the bottom section


 * former| | 0 /km2 (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)


 * 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)


 * ✅ 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)

Proposed 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)


 * 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)


 * Yes, it looks like an improvement to me. mge o  talk 09:23, 23 October 2011 (UTC)


 * 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)


 * This is definitely an improvement. I'm adding an edit request.--2Neuenburg (talk) 22:26, 14 November 2011 (UTC)

{{Hidden {{#if: {{{area| x }}} | {{!}} Area {{#if: {{{area_source|}}}|{{{area_source|}}}}} {{!!}} {{convert|{{{area|0}}}|km2|abbr=on}} }} {{#if:{{{elevation| x }}}| {{!}}Elevation {{!!}} {{convert|{{{elevation|0}}}|m|ft|0|abbr=on}}{{#if: {{{elevation_description|}}}| {{{elevation_description}}}|}} }}{{#if:{{{altitude|}}}|{{!}}Elevation{{!!}}{{convert|{{{altitude|0}}}|m|ft|0|abbr=on}} {{#if: {{{altitude_description|}}}| {{{altitude_description}}}|}} }} {{#if:{{{highest_m| x }}}| {{!}}  - Highest {{!!}} {{{highest_m|0}}} m - {{{highest|}}} }} {{#if:{{{lowest_m| x }}}| {{!}}  - Lowest {{!!}} {{{lowest_m|0}}} m - {{{lowest|}}} }} {{#if:{{{municipality_code|}}}|{{!}}SFOS number {{!!}} {{{municipality_code}}}}}{{#if:{{{municipal_code| x }}}| {{!}}SFOS number {{!!}} {{{municipal_code}}} }} {{#if:{{{mayor| x }}}| {{!}}{{#if:{{{list_of_mayors|}}}|Mayor (list)|Mayor}} {{!!}} {{{mayor}}}{{#if: {{{mayor_asof|}}}| (as of {{{mayor_asof}}}) |}} {{#if: {{{mayor_party| x }}}| {{polparty|Switzerland|{{{mayor_party}}}}} |}} }} {{#if:{{{demonym| x }}}| {{!}}  Demonym  {{!!}} {{{demonym}}} }} {{#if:{{{places| x }}}| {{!}} Localities {{!!}} {{{places}}} }} {{#if:{{{neighboring_municipalities| x }}}| {{!}} Surrounded by {{!!}} {{{neighboring_municipalities}}} }} {{#if:{{{twintowns| x }}}| {{!}} Twin towns {{!!}} {{{twintowns}}} }} {{!}} Website {{!!}} {{#if:{{{website| x }}}| {{{website}}} | {{{subject_name}}} .ch }} {{#switch:{{{iso-code-region}}} ! colspan=2 align=center | {{Location map|Switzerland|float=left|width=265 ! 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}}}  | x }} }} }} }} }} }} {{{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}}}  }} | 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| | {{#ifeq:{{{municipality_type}}}|village| | }}}} | #default = {{#ifeq:{{{municipality_type}}}|former| | {{#ifeq:{{{municipality_type}}}|village| }} }} }} }}
 * header=Please change
 * content= |- {{#if:{{{elevation|{{{altitude| x }}}}}} | class="mergedrow" | class="mergedbottomrow"}}
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedtoprow"
 * Postal code || {{{postal_code}}}
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - {{#if:{{{twintowns|}}}|class="mergedrow"|class="mergedbottomrow"}}
 * - class="mergedrow"
 * - class="mergedbottomrow"
 * CH-LU= Profile {{de icon}},
 * CH-NE= Profile {{fr icon}},
 * CH-TI= Profile {{it icon}},
 * CH-VD= Profile,
 * CH-SH= |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}},
 * }} SFSO statistics
 * label={{{subject_name}}}
 * lat={{#expr:{{{lat_d|0}}}+{{{lat_m|0}}}/60}}|long={{#expr:{{{long_d|0}}}+{{{long_m|0}}}/60}}|position={{#if:{{{position| x }}}|{{{position}}}}}|caption=}}
 * }{{#if:{{NAMESPACE}}||{{#switch: {{{iso-code-region}}}

}} {{Hidden {{!}} Area {{#if: {{{area_source|}}}|{{{area_source|}}}}} {{!!}}{{#iferror: {{Swiss area data|{{{municipality_code}}} }}| {{convert|{{{area|0}}}|km2|abbr=on}} |{{#ifeq:{{{municipality_type}}}|former| {{convert|{{{area|0}}}|km2|abbr=on}} | {{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}} }} }} {{#if:{{{elevation| x }}}| {{!}}Elevation {{!!}} {{convert|{{{elevation|0}}}|m|ft|0|abbr=on}}{{#if: {{{elevation_description|}}}| {{{elevation_description}}}|}} }}{{#if:{{{altitude|}}}|{{!}}Elevation{{!!}}{{convert|{{{altitude|0}}}|m|ft|0|abbr=on}} {{#if: {{{altitude_description|}}}| {{{altitude_description}}}|}} }} {{#if:{{{highest_m| x }}}| {{!}}  - Highest {{!!}} {{{highest_m|0}}} m - {{{highest|}}} }} {{#if:{{{lowest_m| x }}}| {{!}}  - Lowest {{!!}} {{{lowest_m|0}}} m - {{{lowest|}}} }} {{#if:{{{municipality_code|}}}|{{!}}SFOS number {{!!}} {{{municipality_code}}}}}{{#if:{{{municipal_code| x }}}| {{!}}SFOS number {{!!}} {{{municipal_code}}} }} {{#if:{{{mayor| x }}}| {{!}}{{#if:{{{list_of_mayors|}}}|Mayor (list)|Mayor}} {{!!}} {{{mayor}}}{{#if: {{{mayor_asof|}}}| (as of {{{mayor_asof}}}) |}} {{#if: {{{mayor_party| x }}}| {{polparty|Switzerland|{{{mayor_party}}}}} |}} }} {{#if:{{{demonym| x }}}| {{!}}  Demonym  {{!!}} {{{demonym}}} }} {{#if:{{{places| x }}}| {{!}} Localities {{!!}} {{{places}}} }} {{#if:{{{neighboring_municipalities| x }}}| {{!}} Surrounded by {{!!}} {{{neighboring_municipalities}}} }} {{#if:{{{twintowns| x }}}| {{!}} Twin towns {{!!}} {{{twintowns}}} }} {{!}} Website {{!!}} {{#if:{{{website| x }}}| {{{website}}} | {{{subject_name}}} .ch }} {{#switch:{{{iso-code-region}}} ! colspan=2 align=center | {{Location map|Switzerland|float=left|width=265 ! colspan=2 align=center | {{#ifeq:{{{municipality_type}}}|former| {{hidden | header = Map of {{{subject_name}}}  | headercss=height:5px; | content =  }} {{#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]] }} }} | 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| | {{#ifeq:{{{municipality_type}}}|village| | }}}} | #default = {{#ifeq:{{{municipality_type}}}|former| | {{#ifeq:{{{municipality_type}}}|village| }} }} }} }} }}
 * header=into:
 * content= |- {{#if:{{{elevation|{{{altitude| x }}}}}} | class="mergedrow" | class="mergedbottomrow"}}
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedtoprow"
 * Postal code || {{{postal_code}}}
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - class="mergedrow"
 * - {{#if:{{{twintowns|}}}|class="mergedrow"|class="mergedbottomrow"}}
 * - class="mergedrow"
 * - class="mergedbottomrow"
 * CH-LU= Profile {{de icon}},
 * CH-NE= Profile {{fr icon}},
 * CH-TI= Profile {{it icon}},
 * CH-VD= Profile,
 * CH-SH= |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}},
 * }} SFSO statistics
 * label={{{subject_name}}}
 * lat={{#expr:{{{lat_d|0}}}+{{{lat_m|0}}}/60}}|long={{#expr:{{{long_d|0}}}+{{{long_m|0}}}/60}}|position={{#if:{{{position| x }}}|{{{position}}}}}|caption=}}
 * {{hidden | header = Map of {{{subject_name}}} | headercss=height:5px; | content = [[File:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} {{#ifexist: Media:Karte Gemeinde {{SFOS2Municipality|{{{municipality_code}}}}} 2011.png | 2011 |
 * }{{#if:{{NAMESPACE}}||{{#switch: {{{iso-code-region}}}
 * 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)
 * I think I've fixed them all, so not any more.--2Neuenburg (talk) 23:17, 16 November 2011 (UTC)

✅, I've made the above requested change. If there any issues, message me. Blurpeace 00:17, 21 November 2011 (UTC)
 * Actually, it looks like the best version is at the Sandbox.Tobyc75 (talk) 17:17, 21 November 2011 (UTC)
 * something went wrong, see Zinal. Frietjes (talk) 23:47, 22 November 2011 (UTC)
 * 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)

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

Removing superfluous links
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:
 * Country
 * Area
 * Population
 * Density
 * Elevation
 * Surrounded by

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)
 * Done. Plastikspork ―Œ (talk) 00:44, 3 November 2011 (UTC)
 * Thanks. Colonies Chris (talk) 09:34, 3 November 2011 (UTC)

Snow image
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" 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. mge o talk 18:25, 4 December 2011 (UTC)
 * 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. mge o  talk 23:06, 3 January 2012 (UTC)

Edit request on 20 December 2011
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)


 * 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)


 * 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)


 * 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)


 * Deactivated the edit protected request; please specify the exact change(s)&mdash;character for character&mdash;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. -- slakr \ talk / 06:52, 29 December 2011 (UTC)


 * Use a decimal fraction of the minute to achieve arbitrary precision. Bonzon (talk) 19:51, 29 April 2013 (UTC)

Edit request on 3 January 2012
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)
 * Padlock-dash2.svg Not done: requests for changes to the page protection level should be made at Requests for page protection. Anomie⚔ 20:43, 3 January 2012 (UTC)
 * 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)
 * 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)
 * 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)
 * ✅ Happy‑melon 12:08, 6 January 2012 (UTC)

Category changes
The following changes:


 * Category:Villages in Bern to Category:Villages in the canton of Bern
 * Category:Villages in Glarus to Category:Villages in the canton of Glarus
 * Category:Former municipalities of Schaffhausen to Category:Former municipalities of the canton of Schaffhausen
 * Category:Municipalities of Schaffhausen to Category:Municipalities of the canton of Schaffhausen
 * Category:Villages in Schaffhausen to Category:Villages in the canton of Schaffhausen

...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)

Need unprotect to update website address
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)
 * Yes check.svg Done  Sandstein   20:59, 11 May 2012 (UTC)

Suggested change "Map of X" -> "Location of X"
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)
 * 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. mge o  talk 19:26, 27 May 2012 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 13:35, 30 May 2012 (UTC)

Coding syntax fault?
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)
 * 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 ), 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 ) 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 former and 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 . However, File:Karte Gemeinde Aquila.png (with no space before the  ) does exist, so perhaps we need additional code to look for that. -- Red rose64 (talk) 10:25, 11 September 2012 (UTC)


 * It sounds like the code is overly complicated for the process of adding images. -- Alan Liefting (talk - contribs) 19:13, 11 September 2012 (UTC)


 * 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)
 * Yes. Have a look at Template:Infobox Swiss town/testcases; 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. -- Red rose64 (talk) 19:34, 11 September 2012 (UTC)
 * 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)
 * Yes check.svg Done I've to suppress that space, and  is already shrinking. -- Red rose64 (talk) 22:15, 11 September 2012 (UTC)

Here are some more: Zinal, Zimmerwald. -- Alan Liefting (talk - contribs) 09:24, 21 September 2012 (UTC)
 * 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)

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)


 * 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)


 * 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)


 * Another way, and I think this was used for some Christianity related files, is to have a . -- Alan Liefting (talk - contribs) 22:54, 21 September 2012 (UTC)


 * 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)


 * 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)


 * 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)


 * I want a solution that prevents the appearance of a red link. -- Alan Liefting (talk - contribs) 04:59, 22 September 2012 (UTC)


 * 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)

Layout
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. mge o talk 22:17, 23 September 2012 (UTC)

Edit request
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. mge o talk 08:29, 7 December 2012 (UTC)


 * Red question icon with gradient background.svg 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)


 * 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). mge o  talk 13:49, 12 December 2012 (UTC)
 * Done. Nyttend (talk) 13:49, 18 December 2012 (UTC)

Explicitly set empty website
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)

Mayor_asof
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)
 * Yes check.svg Done -- Red rose64 (talk) 18:21, 12 May 2013 (UTC)

Wrapper
Per discussion at Templates for discussion/Log/2013 June 29, 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)
 * 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. -- Aussie Legend  ( ✉ ) 10:53, 10 July 2013 (UTC)
 * 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)

Comments, anyone? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 15:34, 17 August 2013 (UTC)
 * 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)
 * 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)
 * 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)
 * No need, if there's a working wrapper in the sandbox (you refer to [//en.wikipedia.org/w/index.php?title=Template:Infobox_Swiss_town/sandbox&oldid=567281787 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)
 * 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)

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)
 * 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)
 * 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. -- Aussie Legend  ( ✉ ) 04:35, 25 August 2013 (UTC)
 * "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)
 * 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". -- Aussie Legend  ( ✉ ) 14:38, 25 August 2013 (UTC)
 * 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)
 * No, you didn't ask to reopen the TfD, you asked for a whole new one, which is essentially the same thing. -- Aussie Legend  ( ✉ ) 16:32, 25 August 2013 (UTC)
 * 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)
 * 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)
 * 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. -- Aussie Legend  ( ✉ ) 14:38, 25 August 2013 (UTC)

Best practice for deprecated postal codes for former municipalities?
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)
 * 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)
 * Thought as much but you never know. MLauba (Talk) 06:30, 30 August 2013 (UTC)