Open main menu

Changes

{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{high-use| 19,000 }}

==Usage==
This template is intended for use in infoboxes; specifically {{tl|Infobox person}} and [[:Category:Templates calling Infobox person|templates calling Infobox person]].

{{tl|Marriage}} takes up to three unnamed parameters (name, start date, end date)&mdash;plus an optional named parameter {{para|end}}&mdash;to produce output such as the following:

: {{marriage |[[John Doe|Jane Doe]] |1 January 1895 |December 31, 1905}}
: {{marriage |Fred Smith |2010}}
: {{marriage |Jane Smith |1885 |July 27, 1888 |end=d.}}
: {{marriage |Frank Lee |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 |2010}}</nowiki></code>
: <code><nowiki>{{marriage |Jane Smith |1885 |July 27, 1888 |end=d.}}</nowiki></code>
: <code><nowiki>{{marriage |Frank Lee |2002 |2013}}</nowiki></code>

=== In an infobox ===
{{Infobox person|name=Infobox person |spouse = {{Unbulleted list
| {{marriage |[[John Doe|Jane Doe]] |1 January 1895 |December 31, 1905}}
| {{marriage |Fred Smith |2010}}
| {{marriage |Jane Smith |1885 |July 27, 1888 |end=d.}}
| {{marriage |Frank Lee |2002 |2013}}
}}
}}
Infoboxes already reduce text size to 88%, and [[MOS:FONTSIZE]] sets a lower limit for text size at 85% of the normal page font size, so it is not appropriate to use font size reduction when this template is used in an infobox. The example here is produced by:
<pre style="line-height:1.2em;">
{{Infobox person|name=Infobox person |spouse = {{Unbulleted list
| {{marriage |[[John Doe|Jane Doe]] |1 January 1895 |December 31, 1905}}
| {{marriage |Fred Smith |2010}}
| {{marriage |Jane Smith |1885 |July 27, 1888 |end=d.}}
| {{marriage |Frank Lee |2002 |2013}}
}}
}}
</pre>

==Syntax and parameters==
<code>{{((}}marriage&thinsp;{{!}}{{thinsp|<''text''>}}{{!}}{{thinsp|<''start date''>}}{{!}}{{thinsp|<''end date''>}}[{{!}}{{thinsp|end{{=}}}}]{{))}}</code>

{{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

| <''text''>
| Some text&mdash;usually a spouse's name&mdash;preceding the parenthesis carrying the marriage date/s, etc.

| {{plainlist|
*<''start date''>
*<''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|Hover title}}. (See first and third examples above.)

| end
| Reason for marriage's end.

<code>d</code>, <code>d.</code>, or <code>died</code> includes {{green|died}} within the parentheses if the marriage ended on the death of the spouse.

<code>div</code>, <code>div.</code>, or <code>divorced</code> includes {{green|{{abbr|div.|divorced}}}} within the parentheses.

Otherwise, {{para|end|<var>item</var>}} includes customised text. For example:
: <code><nowiki>{{marriage |Miss Doe |January 1, 1882 |December 31, 1905 |end=annulled}}</nowiki></code> which produces: {{marriage |Miss Doe |January 1, 1882 |December 31, 1905 |end=annulled}}

Use of the values <code>w</code>, <code>w.</code>, <code>wid</code>, <code>wid.</code>, <code>widow</code>, or <code>widowed</code> is [[Template talk:Marriage/Archive 4#Who is widowed - topic or topic's spouse?|deprecated]]. See [[:Category:Marriage template errors]].
}}

== TemplateData ==
{{TemplateData header}}
<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
},
"2": {
"label": "Date married",
"description": "Date the marriage began.",
"type": "string",
"default": "",
"required": false
},
"3": {
"label": "Date ended",
"description": "Date the marriage was dissolved or the spouse of the article's subject died.",
"type": "string",
"default": "",
"required": false
},
"end": {
"label": "Reason ended",
"description": "Reason for marriage's end.",
"type": "string",
"default": "",
"required": false,
"aliases": [ "reason" ]
}
}
}</templatedata>

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Wikipedia formatting and function templates]]
}}</includeonly>
Anonymous user