Jump to content

Template:Infobox UK constituency/year: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
TFOWR (talk | contribs)
m Unprotected Template:Infobox UK constituency main/year: Consensus at WP:ANI was to unprotect; emerging consensus at WT:HRT may yet be to re-protect some/many/all - I won't consider it wheel-warring if another admin reprotects. using TW
m syntaxhighlight lang="wikitext"
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#switch:{{{1|}}}
{{#switch:{{{1|}}}
|uk=<!--
|uk={{#ifeq:{{{3}}}|1974|[[United Kingdom general election, February 1974|{{{{{2}}} date|{{{3}}}}}]]|{{#ifexist:United Kingdom general election, {{{3}}}
# If the parliament is UK (meaning UK Parliament at Westminster or its predecessors), try to create a link
|[[United Kingdom general election, {{{3}}}|{{{{{2}}} date|{{{3}}}}}]]
# ... but we treat 1987 as a special case, so process it here
|{{{{{2}}} date|{{{3}}}}}
-->{{#iferror: {{#expr: {{{3|}}} > 0 }}| {{{3|}}} |{{#ifeq:{{{3|}}}|1974|<!--
}}}}
# 1974 was a year of 2 elections.
|#default={{{{{2}}} date|{{{3}}}}}
# Boundary changes took effect in February 1974, so if the year is 1974, we link to the Feb 1974 election
-->[[February 1974 United Kingdom general election|{{{{{2}}} date|{{{3}}}}}]]<!--
# alternatively
--> | {{Infobox UK constituency/year/election-linker|{{{1}}}}|{{{2}}}|{{{3|}}}}}<!--
# End of 1974 test
-->}}}}<!--
# DEFAULT value is applied if the Parliament is not UK
-->|#default={{{{{2}}} date|{{{3}}}}}
}}<noinclude>
}}<noinclude>
<pre>{{/year
<syntaxhighlight lang="wikitext">{{/year
|{{{parliament}}}
|{{{parliament}}}
|start or end
|start or end
|{{{year}}}
|{{{year}}}
}}</pre>
}}</syntaxhighlight>
</noinclude>
</noinclude>

Latest revision as of 19:04, 21 May 2023

{{{{{2}}} date|{{{3}}}}}

{{/year
|{{{parliament}}}
|start or end
|{{{year}}}
}}