3,404 bytes added
, 06:48, 13 December 2014
m{{Documentation subpage}}
{{tl|Marriage}} takes up to three unnamed parameters – plus either, both or neither of the named parameters {{para|()}} and {{para|end}} – to produce output such as the following:
: {{marriage |[[John Doe|Jane Doe]] |1 January 1895 |December 31, 1905}}
: {{marriage |Fred Smith |()=smaller |2010}}
: {{marriage |Jack Ripper |1885 |July 27, 1888 |end=wid.}}
: {{marriage|()=small |Frank Lee & Aynee Text |2002 |2013}}
The above were produced by:
: <code><nowiki>{{marriage |[[John Doe|Jane Doe]] |1 January 1895 |December 31, 1905}}</nowiki></code>
: <code><nowiki>{{marriage |Fred Smith |()=smaller |2010}}</nowiki></code>
: <code><nowiki>{{marriage |Jack Ripper |1885 |July 27, 1888 |end=w.}}</nowiki></code>
: <code><nowiki>{{marriage|()=small |Frank Lee & Aynee Text |2002 |2013}}</nowiki></code>
===Syntax and parameters===
<code>{{((}}marriage({{thinsp|{{!}}(){{=}}}}) {{!}}{{thinsp|[''Text'']}} {{!}}{{thinsp|[''start date'']}} {{!}}{{thinsp|[''end date'']}} ({{thinsp|{{!}}end{{=}}}}){{))}}
{{Aligned table |class=wikitable |style=line-height:1.35em;
|col1style=vertical-align:middle;text-align:center;padding-right:1.0em; |col2style=vertical-align:middle;padding-right:0.5em;
|row1style=background:whitesmoke;vertical-align:middle;text-align:center;font-weight:bold;
| Parameter | Description
| ()
| Set {{para|()|small}} or {{para|()|smaller}} to reduce the font-size used for the parenthesis. (See second and fourth examples above.)
| ''Text''
| Some text – usually a spouse's name – preceding the parenthesis carrying the marriage date/s, etc.
| ''start date''<br />''end date''
| Only the year within each of these will be displayed. If either has more information (''e.g.'', month, day), it is given via a tooltip, ''i.e.'', {{tla|Abbr}}. (See first and third examples above.)
| end
| Reason for marriage's end.
: Set {{para|end}}"div", "div." or "divorced" (without quotemarks) to include "{{abbr|div.|divorced}}" within the parenthesis;
: or {{para|end}}"w", "w.", "wid", "wid." or "widowed" (without quotemarks) to include "{{abbr|wid.|widowed}}" (see third example above);
: or {{para|end}}[''item''] to use a customised text/tooltip/etc. For example:
:: <code><nowiki>{{marriage |Miss Doe |January 1, 1882 |December 31, 1905 |end={{abbr|d.|died}}}}</nowiki></code><br />which produces: {{marriage |Miss Doe |January 1, 1882 |December 31, 1905 |end={{abbr|d.|died}}}}
}}
== TemplateData ==
<templatedata>{
"description": "insert description here",
"params": {
"1": {
"label": "Spouse's name",
"description": "Name of the person to whom the subject is married.",
"type": "string",
"default": "",
"required": true,
"aliases": [ "spouse" ]
},
"2": {
"label": "Date married",
"description": "Date the marriage began.",
"type": "string",
"default": "",
"required": true,
"aliases": [ "date" ]
},
"3": {
"label": "Date ended",
"description": "Date the marriage was dissolved or the spouse of the article's subject died.",
"type": "string",
"default": "",
"required": false,
"aliases": [ "end" ]
}
}
}</templatedata>
<includeonly>
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
[[Category:Wikipedia formatting and function templates]]
[[zh:Template:Marriage]]
}}
</includeonly>