Template:Political-party: Difference between revisions
SGPolitico (talk | contribs) No edit summary |
SGPolitico (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<!-- ================================================================ | |||
Template:Political-party | |||
Unified display + Cargo template for political party pages. | |||
Cargo table: parties | |||
Last updated: 2026-05-17 | |||
================================================================ --> | |||
<!-- ── CARGO DECLARE (runs once, on template page itself) ──────── --> | |||
<noinclude>{{#cargo_declare:_table=parties | <noinclude>{{#cargo_declare:_table=parties | ||
|party_id=String | |party_id=String | ||
| Line 11: | Line 19: | ||
|leader_name2=String | |leader_name2=String | ||
|leader_designation2=String | |leader_designation2=String | ||
|leader_name3=String | |||
|leader_designation3=String | |||
|headquarters=String | |||
|membership_year=String | |||
|membership=String | |||
|ideology=String | |||
|political_position=String | |||
|international=String | |||
|colours=String | |||
|youth_wing=String | |||
|womens_wing=String | |||
|website=String | |website=String | ||
|status=String | |status=String | ||
}}</noinclude><includeonly>{{#cargo_store:_table=parties | |election_symbol=String | ||
|uen=String | |||
}}</noinclude> | |||
<!-- ── CARGO STORE (runs on every transclusion) ────────────────── --> | |||
<includeonly>{{#cargo_store:_table=parties | |||
|party_id={{{party_id|}}} | |party_id={{{party_id|}}} | ||
|name={{{name|}}} | |name={{{name|}}} | ||
| Line 26: | Line 49: | ||
|leader_name2={{{leader_name2|}}} | |leader_name2={{{leader_name2|}}} | ||
|leader_designation2={{{leader_designation2|}}} | |leader_designation2={{{leader_designation2|}}} | ||
|leader_name3={{{leader_name3|}}} | |||
|leader_designation3={{{leader_designation3|}}} | |||
|headquarters={{{headquarters|}}} | |||
|membership_year={{{membership_year|}}} | |||
|membership={{{membership|}}} | |||
|ideology={{{ideology|}}} | |||
|political_position={{{political_position|}}} | |||
|international={{{international|}}} | |||
|colours={{{colours|}}} | |||
|youth_wing={{{youth_wing|}}} | |||
|womens_wing={{{womens_wing|}}} | |||
|website={{{website|}}} | |website={{{website|}}} | ||
|status={{{status|}}} | |status={{{status|}}} | ||
}}</includeonly><div style="width: | |election_symbol={{{election_symbol|}}} | ||
{| | |uen={{{uen|}}} | ||
|colspan="2" style="padding: | }}</includeonly> | ||
<!-- ── STATUS BADGE HELPER ─────────────────────────────────────── --> | |||
<!-- Maps status string to a coloured badge, similar to how Wikipedia | |||
infobox company signals defunct/active state visually. --> | |||
<includeonly>{{#switch: {{{status|}}} | |||
| active = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#d4edda;color:#155724;font-size:90%;font-weight:bold;">Active</span> | |||
| deregistered = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#f8d7da;color:#721c24;font-size:90%;font-weight:bold;">Deregistered</span> | |||
| merged = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#fff3cd;color:#856404;font-size:90%;font-weight:bold;">Merged</span> | |||
| dissolved = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#e2e3e5;color:#383d41;font-size:90%;font-weight:bold;">Dissolved</span> | |||
| #default = {{{status|}}} | |||
}} | |||
</includeonly> | |||
<!-- ── DISPLAY INFOBOX ─────────────────────────────────────────── --> | |||
<includeonly><div class="infobox-political-party" style="width:280px;min-width:200px;max-width:320px;float:right;clear:right;margin:0 0 1em 1.5em;font-size:88%;line-height:1.5;border:1px solid #a2a9b1;background:#f8f9fa;border-collapse:collapse;"> | |||
<!-- ── LOGO / IMAGE ─────────────────────────────────────────────── --> | |||
<div style="text-align:center;padding:8px 4px 4px;"> | |||
{{#if:{{{image|}}} | |||
| [[File:{{{image}}}|200px|center|alt={{{name|}}} logo]] | |||
| <!-- no image: show placeholder bar --> | |||
<div style="height:8px;background:#e8e8e8;margin:0 20px;border-radius:2px;"></div> | |||
}} | |||
</div> | |||
<!-- ── PARTY NAME HEADER ──────────────────────────────────────── --> | |||
<div style="background:#2c3e50;color:#ffffff;text-align:center;padding:6px 8px;font-size:108%;font-weight:bold;line-height:1.3;"> | |||
{{#if:{{{name|}}}|{{{name}}}|''Party name missing''}} | |||
{{#if:{{{abbreviation|}}}|<br/><span style="font-size:80%;font-weight:normal;opacity:0.85;">({{{abbreviation|}}}</span>{{#if:{{{election_symbol|}}}| · Symbol: {{{election_symbol|}}}|}})}} | |||
</div> | |||
<!-- ── COLOUR STRIPE (shown only when colours field is set) ────── --> | |||
{{#if:{{{colours|}}} | |||
| <div style="height:5px;background:{{{colours|#cccccc}}};"></div> | |||
| <div style="height:5px;background:#cccccc;"></div> | |||
}} | |||
<!-- ── INFOBOX ROWS ───────────────────────────────────────────── --> | |||
<table style="width:100%;border-collapse:collapse;background:transparent;"> | |||
<!-- Other names --> | |||
{{#if:{{{other_names|}}} | |||
|<tr><th style="width:38%;padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Other names</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{other_names|}}}</td></tr> | |||
}} | |||
<!-- Status (always shown) --> | |||
<tr><th style="width:38%;padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Status</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{#switch: {{{status|}}} | |||
| active = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#d4edda;color:#155724;font-size:90%;font-weight:bold;">Active</span> | |||
| deregistered = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#f8d7da;color:#721c24;font-size:90%;font-weight:bold;">Deregistered</span> | |||
| merged = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#fff3cd;color:#856404;font-size:90%;font-weight:bold;">Merged</span> | |||
| dissolved = <span style="display:inline-block;padding:1px 7px;border-radius:3px;background:#e2e3e5;color:#383d41;font-size:90%;font-weight:bold;">Dissolved</span> | |||
| #default = {{{status|}}} | |||
}}</td></tr> | |||
<!-- ── SECTION HEADER: Leadership ────────────────────────────── --> | |||
{{#if:{{{leader_name1|}}} | |||
|<tr><th colspan="2" style="padding:3px 6px;border-top:1px solid #a2a9b1;background:#2c3e50;color:#fff;font-size:90%;text-align:left;letter-spacing:0.04em;">Leadership</th></tr> | |||
}} | |||
<!-- Leader 1 --> | |||
{{#if:{{{leader_name1|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;"> | |||
{{#if:{{{leader_designation1|}}}|{{{leader_designation1|}}}|Leader}} | |||
</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">[[{{{leader_name1|}}}]]</td></tr> | |||
}} | |||
<!-- Leader 2 --> | |||
{{#if:{{{leader_name2|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;"> | |||
{{#if:{{{leader_designation2|}}}|{{{leader_designation2|}}}|Deputy}} | |||
</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">[[{{{leader_name2|}}}]]</td></tr> | |||
}} | |||
<!-- Leader 3 --> | |||
{{#if:{{{leader_name3|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;"> | |||
{{#if:{{{leader_designation3|}}}|{{{leader_designation3|}}}|Other leader}} | |||
</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">[[{{{leader_name3|}}}]]</td></tr> | |||
}} | |||
<!-- ── SECTION HEADER: Organisation ──────────────────────────── --> | |||
<tr><th colspan="2" style="padding:3px 6px;border-top:1px solid #a2a9b1;background:#2c3e50;color:#fff;font-size:90%;text-align:left;letter-spacing:0.04em;">Organisation</th></tr> | |||
<!-- Founded --> | |||
{{#if:{{{founded_date|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Founded</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;"> | |||
{{#time:j F Y|{{{founded_date}}}}} | |||
<span style="color:#555;font-size:90%;">({{#expr:{{CURRENTYEAR}}-{{#time:Y|{{{founded_date}}}}}}} years ago)</span> | |||
</td></tr> | |||
}} | |||
<!-- Dissolved (only if set) --> | |||
{{#if:{{{dissolved_date|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Dissolved</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{#time:j F Y|{{{dissolved_date}}}}}</td></tr> | |||
}} | |||
<!-- Headquarters --> | |||
{{#if:{{{headquarters|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Headquarters</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{headquarters|}}}</td></tr> | |||
}} | |||
<!-- UEN (Unique Entity Number — ROS registration) --> | |||
{{#if:{{{uen|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">UEN</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-family:monospace;">{{{uen|}}}</td></tr> | |||
}} | |||
<!-- Membership --> | |||
{{#if:{{{membership|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Membership{{#if:{{{membership_year|}}}|<br/><span style="font-weight:normal;font-size:88%;color:#555;">({{{membership_year|}}}</span>|}}</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{membership|}}}</td></tr> | |||
}} | |||
<!-- ── SECTION HEADER: Politics ───────────────────────────────── --> | |||
{{#if:{{{ideology|}}}{{{political_position|}}}{{{international|}}} | |||
|<tr><th colspan="2" style="padding:3px 6px;border-top:1px solid #a2a9b1;background:#2c3e50;color:#fff;font-size:90%;text-align:left;letter-spacing:0.04em;">Political positions</th></tr> | |||
}} | |||
<!-- Ideology --> | |||
{{#if:{{{ideology|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Ideology</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{ideology|}}}</td></tr> | |||
}} | |||
<!-- Political position --> | |||
{{#if:{{{political_position|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Political position</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{political_position|}}}</td></tr> | |||
}} | |||
<!-- International affiliation --> | |||
{{#if:{{{international|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">International</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{international|}}}</td></tr> | |||
}} | |||
<!-- ── SECTION HEADER: Wings ──────────────────────────────────── --> | |||
{{#if:{{{youth_wing|}}}{{{womens_wing|}}} | |||
|<tr><th colspan="2" style="padding:3px 6px;border-top:1px solid #a2a9b1;background:#2c3e50;color:#fff;font-size:90%;text-align:left;letter-spacing:0.04em;">Associated organisations</th></tr> | |||
}} | |||
<!-- Youth wing --> | |||
{{#if:{{{youth_wing|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Youth wing</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{youth_wing|}}}</td></tr> | |||
}} | |||
<!-- Women's wing --> | |||
{{#if:{{{womens_wing|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Women's wing</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">{{{womens_wing|}}}</td></tr> | |||
}} | |||
<!-- ── SECTION HEADER: External ───────────────────────────────── --> | |||
{{#if:{{{website|}}} | |||
|<tr><th colspan="2" style="padding:3px 6px;border-top:1px solid #a2a9b1;background:#2c3e50;color:#fff;font-size:90%;text-align:left;letter-spacing:0.04em;">External links</th></tr> | |||
}} | |||
<!-- Website --> | |||
{{#if:{{{website|}}} | |||
|<tr><th style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;font-weight:bold;background:#eaecf0;">Website</th> | |||
<td style="padding:4px 6px;border-top:1px solid #a2a9b1;vertical-align:top;">[{{{website|}}} Official website]</td></tr> | |||
}} | |||
</table> | |||
</div></includeonly> | |||
<!-- ================================================================ | |||
DOCUMENTATION (visible on template page only) | |||
================================================================ --> | |||
<noinclude> | |||
== Usage == | |||
Unified display and Cargo template for political party pages. | |||
Use this for all party pages. Do not use the old <code>Infobox-party</code>. | |||
Minimum required fields: <code>party_id</code>, <code>name</code>, <code>abbreviation</code>, | |||
<code>founded_date</code>, <code>status</code>, <code>leader_name1</code>, <code>leader_designation1</code>. | |||
=== Full example (PAP) === | |||
<pre> | |||
{{Political-party | |||
|party_id = pap | |||
|name = People's Action Party | |||
|other_names = 人民行动党, Parti Tindakan Rakyat, மக்களின் செயல் கட்சி | |||
|abbreviation = PAP | |||
|image = PAP logo.png | |||
|colours = #002868 | |||
|election_symbol = Lightning bolt | |||
|founded_date = 1954-11-21 | |||
|dissolved_date = | |||
|leader_name1 = lawrence-wong | |||
|leader_designation1 = Secretary-General | |||
|leader_name2 = heng-swee-keat | |||
|leader_designation2 = Chairman | |||
|leader_name3 = | |||
|leader_designation3 = | |||
|headquarters = PAP Headquarters, 57B New Upper Changi Road, Singapore 462057 | |||
|uen = S59SS0001F | |||
|membership = ~20,000 | |||
|membership_year = 2023 | |||
|ideology = [[Pragmatism]], [[Social conservatism]], [[Meritocracy]] | |||
|political_position= [[Centre-right politics|Centre-right]] | |||
|international = | |||
|youth_wing = Young PAP | |||
|womens_wing = PAP Women's Wing | |||
|website = https://www.pap.org.sg | |||
|status = active | |||
}} | |||
</pre> | |||
=== Minimal example (SMC-level party) === | |||
<pre> | |||
{{Political-party | |||
|party_id = rdu | |||
|name = Red Dot United | |||
|abbreviation = RDU | |||
|founded_date = 2020-07-10 | |||
|leader_name1 = ravi-philemon | |||
|leader_designation1 = Secretary-General | |||
|website = https://www.reddotunited.sg | |||
|status = active | |||
}} | |||
</pre> | |||
=== Field reference === | |||
{| class="wikitable" | |||
! Field !! Type !! Required !! Notes | |||
|- | |||
| <code>party_id</code> || slug || Yes || Permanent. Lowercase hyphenated. e.g. <code>pap</code>, <code>wp</code> | |||
|- | |||
| <code>name</code> || text || Yes || Full English name | |||
|- | |||
| <code>other_names</code> || text || No || Other language names, comma-separated | |||
|- | |||
| <code>abbreviation</code> || text || Yes || e.g. <code>PAP</code>, <code>WP</code> | |||
|- | |||
| <code>image</code> || filename || No || Filename only e.g. <code>PAP logo.png</code> | |||
|- | |||
| <code>colours</code> || CSS colour || No || Used as stripe. e.g. <code>#002868</code> or <code>red</code> | |||
|- | |||
| <code>election_symbol</code> || text || No || Symbol name as registered with ELD | |||
|- | |||
| <code>founded_date</code> || YYYY-MM-DD || Yes || ISO date | |||
|- | |||
| <code>dissolved_date</code> || YYYY-MM-DD || No || Leave blank if active | |||
|- | |||
| <code>leader_name1</code> || mp_id slug || Yes || e.g. <code>lawrence-wong</code> | |||
|- | |||
| <code>leader_designation1</code> || text || Yes || e.g. <code>Secretary-General</code> | |||
|- | |||
| <code>leader_name2</code> || mp_id slug || No || | |||
|- | |- | ||
| <code>leader_designation2</code> || text || No || | |||
|- | |- | ||
| | | <code>leader_name3</code> || mp_id slug || No || | ||
| | |||
|- | |- | ||
| | | <code>leader_designation3</code> || text || No || | ||
| | |||
|- | |- | ||
| | | <code>headquarters</code> || text || No || Full address | ||
|- | |- | ||
| | | <code>uen</code> || text || No || ROS Unique Entity Number | ||
| | |||
|- | |- | ||
| <code>membership</code> || text || No || e.g. <code>~20,000</code> | |||
|- | |||
| <code>membership_year</code> || text || No || Year of membership figure | |||
|- | |||
| <code>ideology</code> || text || No || Wikilinked ideological terms | |||
|- | |||
| <code>political_position</code> || text || No || e.g. <code>Centre-right</code> | |||
|- | |||
| <code>international</code> || text || No || International affiliations | |||
|- | |||
| <code>youth_wing</code> || text || No || | |||
|- | |- | ||
| | | <code>womens_wing</code> || text || No || | ||
| | |||
|- | |- | ||
| | | <code>website</code> || URL || No || Full URL with https | ||
| | |||
|- | |- | ||
| | | <code>status</code> || enum || Yes || <code>active</code> / <code>deregistered</code> / <code>merged</code> / <code>dissolved</code> | ||
| | |||
|} | |} | ||
=== Valid status values === | |||
* <code>active</code> — currently registered and operating | |||
* <code>deregistered</code> — removed from ROS register | |||
* <code>merged</code> — absorbed into another party | |||
* <code>dissolved</code> — voluntarily wound up | |||
[[Category:Infobox templates]] | |||
[[Category:Cargo templates]] | |||
[[Category:Political party templates]] | |||
</noinclude> | </noinclude> | ||
Revision as of 21:18, 16 May 2026
This template defines the table "parties". View table.
Usage
Unified display and Cargo template for political party pages.
Use this for all party pages. Do not use the old Infobox-party.
Minimum required fields: party_id, name, abbreviation,
founded_date, status, leader_name1, leader_designation1.
Full example (PAP)
{{Political-party
|party_id = pap
|name = People's Action Party
|other_names = 人民行动党, Parti Tindakan Rakyat, மக்களின் செயல் கட்சி
|abbreviation = PAP
|image = PAP logo.png
|colours = #002868
|election_symbol = Lightning bolt
|founded_date = 1954-11-21
|dissolved_date =
|leader_name1 = lawrence-wong
|leader_designation1 = Secretary-General
|leader_name2 = heng-swee-keat
|leader_designation2 = Chairman
|leader_name3 =
|leader_designation3 =
|headquarters = PAP Headquarters, 57B New Upper Changi Road, Singapore 462057
|uen = S59SS0001F
|membership = ~20,000
|membership_year = 2023
|ideology = [[Pragmatism]], [[Social conservatism]], [[Meritocracy]]
|political_position= [[Centre-right politics|Centre-right]]
|international =
|youth_wing = Young PAP
|womens_wing = PAP Women's Wing
|website = https://www.pap.org.sg
|status = active
}}
Minimal example (SMC-level party)
{{Political-party
|party_id = rdu
|name = Red Dot United
|abbreviation = RDU
|founded_date = 2020-07-10
|leader_name1 = ravi-philemon
|leader_designation1 = Secretary-General
|website = https://www.reddotunited.sg
|status = active
}}
Field reference
| Field | Type | Required | Notes |
|---|---|---|---|
party_id |
slug | Yes | Permanent. Lowercase hyphenated. e.g. pap, wp
|
name |
text | Yes | Full English name |
other_names |
text | No | Other language names, comma-separated |
abbreviation |
text | Yes | e.g. PAP, WP
|
image |
filename | No | Filename only e.g. PAP logo.png
|
colours |
CSS colour | No | Used as stripe. e.g. #002868 or red
|
election_symbol |
text | No | Symbol name as registered with ELD |
founded_date |
YYYY-MM-DD | Yes | ISO date |
dissolved_date |
YYYY-MM-DD | No | Leave blank if active |
leader_name1 |
mp_id slug | Yes | e.g. lawrence-wong
|
leader_designation1 |
text | Yes | e.g. Secretary-General
|
leader_name2 |
mp_id slug | No | |
leader_designation2 |
text | No | |
leader_name3 |
mp_id slug | No | |
leader_designation3 |
text | No | |
headquarters |
text | No | Full address |
uen |
text | No | ROS Unique Entity Number |
membership |
text | No | e.g. ~20,000
|
membership_year |
text | No | Year of membership figure |
ideology |
text | No | Wikilinked ideological terms |
political_position |
text | No | e.g. Centre-right
|
international |
text | No | International affiliations |
youth_wing |
text | No | |
womens_wing |
text | No | |
website |
URL | No | Full URL with https |
status |
enum | Yes | active / deregistered / merged / dissolved
|
Valid status values
active— currently registered and operatingderegistered— removed from ROS registermerged— absorbed into another partydissolved— voluntarily wound up