Template:TR mayor: Difference between revisions
Appearance
Content deleted Content added
mNo edit summary |
move cat to doc |
||
(18 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{header|}}}|yes|<table class="wikitable sortable"> |
<includeonly><!-- |
||
-->{{#ifeq:{{{header|}}}|yes|<table class="wikitable sortable"><caption>{{{caption|}}}</caption><!-- |
|||
⚫ | |||
<caption>{{{caption|}}}</caption> |
|||
-->{{#ifeq:{{{footer|}}}{{{header|}}}||<tr class="vcard"><td>{{{period|}}} {{#ifeq:{{{declined|}}}|yes|(declined)}} {{#if:{{{sequence|}}}|({{#invoke:Ordinal|ordinal|{{{sequence}}}}})}}</td><td class="fn">{{{mayor|}}}</td><td> {{#if:{{{lifespan|}}}|({{{lifespan}}})}}</td><td class="org">{{{party|}}}</td><td>{{{ref|}}} {{{note|}}} {{#ifeq:{{{term|}}}{{{mayor|}}}|| }} </td></tr>}}<!-- |
|||
⚫ | |||
{{#ifeq:{{{footer|}}}|yes|</table> |
-->{{#ifeq:{{{footer|}}}|yes|</table>}}<!-- |
||
⚫ | |||
<tr><td>{{{term|}}}</td><td>{{{mayor|}}} {{#if:{{{lifespan|}}}|({{{lifespan}}})}}</td><td>{{{party|}}}</td></tr> |
|||
{{Documentation}} |
|||
⚫ | |||
</noinclude> |
Latest revision as of 17:27, 10 June 2020
Template to build lists of mayors, one template per table row. Sample: List of mayors of Solothurn
- Standard format
- {{TR mayor|period=|mayor=|lifespan=|party=}}
- Complete lines
- {{TR mayor|period=|mayor=|lifespan=|party=|note=|ref=|sequence=}}
- Empty lines
- {{TR mayor}}
- Elected, but declined
- {{TR mayor|period=|declined=yes|mayor=|lifespan=|party=}}
Requires:
- {{TR mayor|header=yes}} before the first row (to add the table header markup "<table>")
- {{TR mayor|footer=yes}} after the last row (to add the table footer markup "</table>").
Usage
[edit]Sample:
{{TR mayor|header=yes|caption=Mayor of Oldtown|place=[[Oldtown]]}}
{{TR mayor|period=1870-1880|mayor=[[Georg Müller]]|lifespan=1820-1880|party=}}
{{TR mayor}}
{{TR mayor|period=1885-1910|mayor=[[Jakob Müller]]|lifespan=1845-1910|party=JKL/MNO|note=father of Peter Müller
|ref=<ref>{{cite book |last= Mauch|first=Corine |date= 1949|title=Jakob Müller, mayor of Oldtime, father of the city |location= Oldtown}}</ref>}}
{{TR mayor|period=1910-1950|mayor=[[Peter Müller (politician)|Peter Müller]]|lifespan=1870-1950|party=GHI|note=resigned 4 days before his death}}
{{TR mayor|period=1950-2012|mayor=[[Corine Mauch]]|lifespan=1920-2012|party=independent, until 1951: DEF/UVW}}
{{TR mayor|period=2012|mayor=[[Hans Meier]]|lifespan=born 1950|party=ABC/XYZ|sequence=1}}
{{TR mayor|period=2012|declined=yes|mayor=[[Peter Schweizer]]|lifespan=born 1940|party=independent}}
{{TR mayor|period=2013-present|mayor=[[Hans Meier]]|lifespan=born 1950|party=ABC/XYZ|sequence=2}}
{{TR mayor|footer=yes}}
{{reflist}}
Result:
Term | Mayor | Lifespan | Party | Notes |
---|---|---|---|---|
1870-1880 | Georg Müller | (1820-1880) | ||
1885-1910 | Jakob Müller | (1845-1910) | JKL/MNO | [1] father of Peter Müller |
1910-1950 | Peter Müller | (1870-1950) | GHI | resigned 4 days before his death |
1950-2012 | Corine Mauch | (1920-2012) | independent, until 1951: DEF/UVW | |
2012 (1st) | Hans Meier | (born 1950) | ABC/XYZ | |
2012 (declined) | Peter Schweizer | (born 1940) | independent | |
2013-present (2nd) | Hans Meier | (born 1950) | ABC/XYZ |
Blank:
{{TR mayor|header=yes|caption=|place=}}
{{TR mayor}}
{{TR mayor|period=|mayor=|lifespan=|party=}}
{{TR mayor|period=|mayor=|lifespan=|party=|note=|ref=}}
{{TR mayor|footer=yes}}
Result:
Term | Mayor | Lifespan | Party | Notes |
---|---|---|---|---|