Шаблон:NZ party list candidate
Basic structure
A party list displayed using these templates needs to have, in order, these three components:
{{NZ party list begin}}
, which starts the table and creates the headings.- As many instances of
{{NZ party list candidate}}
as there are candidates on the list, with various parameters (which look likesomething = whatever
) defined in each one. - The code
{{NZ party list end}}
, which ends the table.
Examples
A party list with one person on it might look like this:
- {{NZ party list begin}}
- {{NZ party list candidate| |year = 1890
- |rank = 1
- |lastname = Seddon
- |fullname = [[Richard Seddon]]
- |incumbency = electorate
- |contesting = Westland
- |previousrank = 100
- }}
- {{NZ party list end}}
This would produce:
Rank | Name | Incumbency | Contesting electorate | Previous rank |
Change | Initial results | Later changes |
---|---|---|---|---|---|---|---|
1 | Richard Seddon | Electorate | Westland | 100 | +99 |
To add further candidates, just add duplicate the {{NZ party list begin}}
template (i.e., everything in green in the example, including the }}
after the last parameter). For example:
- {{NZ party list begin}}
- {{NZ party list candidate| |year = 1890
- |rank = 1
- |lastname = Seddon
- |fullname = [[Richard Seddon]]
- |incumbency = electorate
- |contesting = Westland
- |previousrank = 100
- }}
- {{NZ party list candidate| |year = 1890
- |rank = 2
- |lastname = Reeves
- |fullname = [[William Pember Reeves]]
- |incumbency = list
- |contesting = City of Christchurch
- |previousrank = 1
- }}
- {{NZ party list end}}
This would produce:
Rank | Name | Incumbency | Contesting electorate | Previous rank |
Change | Initial results | Later changes |
---|---|---|---|---|---|---|---|
1 | Richard Seddon | Electorate | Westland | 100 | +99 | ||
2 | William Pember Reeves | Electorate | City of Christchurch | 1 | -1 |
The examples above place each parameter on a new line, but note that it's also possible to "compress" them for the sake of space. This may make long lists easier to manage. For example, the above list could also be created with:
- {{NZ party list begin}}
- {{NZ party list candidate| |year = 1890 | rank = 1 | lastname = Seddon | fullname = [[Richard Seddon]] | incumbency = electorate | contesting = Westland | previousrank = 100}}
- {{NZ party list candidate| |year = 1890 | rank = 2 | lastname = Reeves | fullname = [[William Pember Reeves]] | incumbency = electorate | contesting = City of Christchurch | previousrank = 1}}
- {{NZ party list end}}
Parameters
There are various different parameters (something = whatever
) that can be used in a candidate's entry. Generally, it's probably safest if only parameters which are actually required are included. (That is, don't leave blank parameters (like something =
) in the code — hopefully it shouldn't matter, but there's the potential for problems.) Parameters should be entered exactly, as things like capitalisation can matter. The list of parameters is:
Parameter | Example | Purpose |
---|---|---|
year | |year = 1890 | The year of the election. (Necessary for the template to know which list-of-candidates-by-electorate page to link to.) |
rank | |rank = 1 | The rank of the candidate on the list in question. If a candidate isn't on a list, put rank = none. If their position on a list isn't yet known, put rank = tba. |
lastname | |lastname = Seddon | The candidate's last name. (Necessary to allow sorting the table by such, so that Richard Seddon is sorted under S rather than R). |
fullname | |fullname = [[Richard Seddon]] | The candidate's full name - as a link, if applicable. (Bolding is not necessary here — it should be automatic.) |
subparty | |subparty = Radical | If the component party column is visible (by default, it isn't — see "Optional columns"), this is used to specify which component party a candidate belongs to. If the column is present but the candidate doesn't belong to a subparty, use none rather than just skipping it. If the column isn't visible, don't use this at all, or the table will be messed up. |
incumbency | |incumbency = electorate | Whether the candidate is a current or former MP of some sort. Options here are: Eketahuna Central (e.g.) (if they hold an electorate and you want to say which one) electorate (if they hold an electorate but you don't want to say which one) list (if they're a list MP) former (if they're an ex-MP of either kind) |
contesting | |contesting = Westland | The name of any electorate that the candidate is also contesting. A link should be automatically generated to the relevant section of a list-of-candidates-by-electorate page if the template can find one for that year, or to the general page for the electorate itself otherwise. |
previousrank | |previousrank = 100 | The candidate's party list rank in the previous elections. The difference between this rank and their new rank should be calculated automatically. If (but only if) the previous rank in question was on the list of a different party, previousparty is used name the previous party. (This is intended for situations such as the merger of United and Future to form United Future, or the departure of the Greens from the Alliance — there is indeed a "previous rank" to display for some candidates, but simply listing it without clarification creates possibilities for confusion.) |
previousparty | |previousparty = Reform | |
result | |result = electorate | Whether or not the candidate ended up getting elected on election day. Options here are: electorate (when they win the electorate they were contesting) list (when they are elected off the list on election night) defeated (when a sitting MP loses their seat) other (when none of the above are adequate, and a special explanation is needed) If a candidate neither gained a seat nor had one to lose, nothing need be entered at all, and the space will simply be blank. |
update | |update = listreplacement | Anything which happened to a candidate after election day which resulted in changes to other people in the list (e.g. a resignation allowing someone else to enter parliament in their place). Some of these open up new parameters to be included — see below. Options here are: byelection (when they enter parliament via a by-election later in the term) listreplacement (when they are not elected off the list straight away, but later enter parliament as a replacement for someone else) left (when a candidate elected on the day later leaves parliament) died (when a candidate elected on the day later dies) listreplacement+left (when a candidate both comes in off the list and leaves again in a single term) other (when none of the above are adequate, and a special explanation is needed) |
replacedwho | |replacedwho = Henry Sewell | If a candidate is listed under update as having come into parliament as a mid-term replacement for someone else, the name of the person they replaced can be given using replacedwho and the year in which it happened (including a link to any relevant by-election) can be given using replacedyear. Default text is used if a piece of information is not given. |
replacedyear | |replacedyear = 1856 | |
|replacedyear = the 1857 Eketahuna by-election | ||
leftyear | |leftyear = 1856 | If a candidate is listed under update as having left parliament or died mid-term, the year in which they did so can be given here. Default text ("[in] the course of the parliamentary term") is used if this information is not given. |
explanation | |explanation = Died before swearing in. | If you have used result = other or update = other, use this to explain it. Whatever you write should appear in the results column verbatim. |
Things that shouldn't need to be done manually in the parameters include:
- Putting the names of incumbent MPs in bold. People for whom incumbency = electorate or incumbency = list should get this automatically. (Links, however, are not automatic, since they can take all sorts of different forms.)
- Making the (Former MP) tag look like such. Just specifying incumbency = former should do it.
- Linking electorates. If the electorates held by incumbent MPs are given, links to electorate pages should be automatic. If a candidate is shown as contesting an electorate, the template should a) automatically detect whether a candidates-by-electorate page exists under the normal naming convention; and b) link to it if one does exist, or link to the plain electorate page if it doesn't.
- Calculating and specifying the difference between a candidate's current rank and their previous rank. Just provide the two values, and the difference between them should be calculated automatically.
- Adding colours and symbols to indicate results (once they're known). Just specify the result (e.g. result = electorate) and the rest should take care of itself. (See the 2008 page for an example of this in action.)
- Sort keys. In theory: all candidates should sort properly by last name; electorates should sort without initial-macron names like Ōhariu causing problems; electorate/list/former incumbencies should sort in that order; and electorate/list/later/defeated results should sort in that order.
Optional columns
There are three options which allow certain columns of the table to be switched on or off, depending on preferences. To do this, two things must be done: firstly, the header template ({{NZ party list begin}}) must have the appropriate parameter added and set; and secondly, every candidate in the table must have the relevant parameters for the column in question set to appropriate values. (Changing the header without making sure the candidate entries are all set up appropriately, or vice versa, will create a mess.)
Optional columns | Default | For the heading | For every candidate | Purpose of element |
---|---|---|---|---|
"Rank" | Visible | registeredparty = no | rank = n/a | When the list is made up of electorate-only candidates, and therefore doesn't need a column for their list ranking. |
"Previous rank" and "Change" | Visible | previouslist = no | previousrank = n/a | When a party didn't have a list in the last election for whatever reason. |
"Component party" | Invisible | jointlist = yes | subparty = Party Name or subparty = none. |
When a party is made up of multiple parties (such as the Christian Coalition) or incorporates a smaller one (such as Outdoor Recreation within United Future). |
For example (with differences from the default bold and underlined):
- {{NZ party list begin| | registeredparty = no | previouslist = no | jointlist = yes }}
- {{NZ party list candidate| |year = 1890
- |rank = n/a
- |lastname = Seddon
- |fullname = [[Richard Seddon]]
- |subparty = Radical
- |incumbency = electorate
- |contesting = Westland
- |previousrank = n/a
- }}
- {{NZ party list end}}
This would produce:
Name | Component Party | Incumbency | Contesting electorate | Initial results | Later changes |
---|---|---|---|---|---|
Richard Seddon | Radical | Electorate | Westland |
See also