Template:Post-nominals/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>GoingBatty
m →‎Commas: typo(s) fixed: etc → etc. using AWB (11376)
meta>Jdforrester (WMF)
+ TemplateData
Line 50: Line 50:
*[[Template:Post-nominals/GBR|United Kingdom]] and [[Template:Post-nominals/GBR-cats|UK with Categories]]
*[[Template:Post-nominals/GBR|United Kingdom]] and [[Template:Post-nominals/GBR-cats|UK with Categories]]
*[[Template:Post-nominals/ZAR|South Africa]]
*[[Template:Post-nominals/ZAR|South Africa]]
== TemplateData ==
<templatedata>
{
"params": {
"1": {
"label": "1st post-nominal",
"description": "A post-nominal to show with a link to the relevant page.",
"example": "GCB",
"type": "string",
"suggested": true
},
"2": {
"inherits": "1",
"label": "2nd post-nominal",
"suggested": false
  },
"3": {
"inherits": "2",
"label": "3rd post-nominal"
  },
"4": {
"inherits": "2",
"label": "4th post-nominal"
  },
"5": {
"inherits": "2",
"label": "5th post-nominal"
  },
"6": {
"inherits": "2",
"label": "6th post-nominal"
  },
"7": {
"inherits": "2",
"label": "7th post-nominal"
  },
"8": {
"inherits": "2",
"label": "8th post-nominal"
  },
"9": {
"inherits": "2",
"label": "9th post-nominal"
  },
"10": {
"inherits": "2",
"label": "10th post-nominal"
  },
"11": {
"inherits": "2",
"label": "11th post-nominal"
  },
"12": {
"inherits": "2",
"label": "12th post-nominal"
  },
"13": {
"inherits": "2",
"label": "13th post-nominal"
  },
"14": {
"inherits": "2",
"label": "14th post-nominal"
  },
"15": {
"inherits": "2",
"label": "15th post-nominal"
  },
"16": {
"inherits": "2",
"label": "16th post-nominal"
  },
"17": {
"inherits": "2",
"label": "17th post-nominal"
  },
"18": {
"inherits": "2",
"label": "18th post-nominal"
  },
"19": {
"inherits": "2",
"label": "19th post-nominal"
  },
"20": {
"inherits": "2",
"label": "20th post-nominal"
  },
"size": {
"label": "Size",
"description": "At what size to show the list; only over-ride if appropriate.",
"example": "100%",
"type": "string",
"default": "85%"
},
"list": {
"aliases": [
"unlinked",
"post-noms"
],
"label": "Unformatted list",
"description": "A list of post-nominals to display without links, or with customised linking.",
"example": "PC [[Order of the British Empire|KBE]]",
"type": "unbalanced-wikitext"
},
"country": {
"example": "GBR",
"label": "Country",
"description": "Which set of awards to use, by ISO 3166-1 alpha-3 country code. By default, the Canadian set is used.",
"type": "string",
"default": "CAN",
"suggested": true
},
"sep": {
"aliases": [
"commas"
],
"label": "Seperator",
"description": "What seperator to use. By default, this uses a space; you can use commas if you wish.",
"type": "string",
"default": " "
}
},
"paramOrder": [
"country",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"sep",
"size",
"list"
],
"format": "inline",
"description": "Show a person's post-nominals cleanly and with links to the relevant articles."
}
</templatedata>


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |

Revision as of 17:35, 23 January 2016

Usage

The default use provides post-nominals linked to the relevant article for the award. By default, the Canadian set of awards is used:

{{post-nominals|PC|CC|OBE}} produces: PC CC OBE

Unlinked and/or custom-linked post-nominals

To list post-nominals without links and/or with customised linking, use |unlinked= or |list= (or |post-noms=):

{{post-nominals|unlinked=PC CC OBE}} produces: PC CC OBE
{{post-nominals|list=[[Order of the British Empire|KBE]]}} produces: KBE

Font size

The optional |size= parameter allows for the size of the text, as a percentage, to be changed from the template's default of 100%:

{{post-nominals|size=85%|PC|CC|OBE}} produces: PC CC OBE

Commas

By default, a single space is placed between each linked post-nominal (see above). To include a comma, set |commas= (or |sep=) as "on", "true", "," etc. (without quotemarks):

{{post-nominals|commas=on|PC|CC|OBE}} produces: PC, CC, OBE

Country

By default, the template links to articles on the Canadian versions of the honours indicated by the post-nominals. To specify another country, include |country=XXX where XXX is the ISO 3166-1 alpha-3 code for that country:

{{post-nominals|country=NZL|PC|OBE}} produces: PC OBE

Currently, the countries supported are Australia (AUS); Canada (CAN); New Zealand (NZL); Nigeria (NG); the United Kingdom (GBR); and South Africa (ZAR). (See data links below.)

Exceptions
  • GNZM GCB GCMG GBE designates both a Knight Grand Cross/Companion and a Dame Grand Cross/Companion. In order to link correctly, however, more specific abbreviations are needed to differentiate between the Knight and Dame. For instance, "Sir John Smith GNZM GCB GCMG GBE" is produced by:
Sir John Smith {{post-nominals|country=NZL|GNZM|GCB|GCMG|GBE}}
while "Dame Jane Jones GNZM GCB GCMG GBE" is produced by:
Dame Jane Jones {{post-nominals|country=NZL|GNZMf|GCBf|GCMGf|GBEf}}
Joseph Jacques Jean Chrétien, {{post-nominals|country=CAN|PC|OMt|CC|QC}}
John Smith {{post-nominals|country=NZL|QFSM|QPM|QPSMd|QPMd}} produces: John Smith QFSM QPM QFSM QPM
Data

Data templates for each supported country:

TemplateData

Show a person's post-nominals cleanly and with links to the relevant articles.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Countrycountry

Which set of awards to use, by ISO 3166-1 alpha-3 country code. By default, the Canadian set is used.

Default
CAN
Example
GBR
Stringsuggested
1st post-nominal1

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringsuggested
2nd post-nominal2

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
3rd post-nominal3

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
4th post-nominal4

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
5th post-nominal5

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
6th post-nominal6

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
7th post-nominal7

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
8th post-nominal8

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
9th post-nominal9

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
10th post-nominal10

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
11th post-nominal11

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
12th post-nominal12

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
13th post-nominal13

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
14th post-nominal14

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
15th post-nominal15

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
16th post-nominal16

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
17th post-nominal17

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
18th post-nominal18

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
19th post-nominal19

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
20th post-nominal20

A post-nominal to show with a link to the relevant page.

Example
GCB
Stringoptional
Seperatorsep commas

What seperator to use. By default, this uses a space; you can use commas if you wish.

Default
Stringoptional
Sizesize

At what size to show the list; only over-ride if appropriate.

Default
85%
Example
100%
Stringoptional
Unformatted listlist unlinked post-noms

A list of post-nominals to display without links, or with customised linking.

Example
PC [[Order of the British Empire|KBE]]
Unbalanced wikitextoptional