Difference between revisions of "Template:Snapshot person"

From OpenGeofiction
Jump to navigation Jump to search
m
(Providing custom anchor ability)
Line 1: Line 1:
<includeonly><table class="snapshot mw-collapsible mw-collapsed" data-expandtext="&#9660;" data-collapsetext="&#9651;">
+
<includeonly>{{#if:{{{anchor|}}}|<div id="{{{anchor}}}"></div>|}}<table class="snapshot mw-collapsible mw-collapsed" data-expandtext="&#9660;" data-collapsetext="&#9651;">
 
<tr><th colspan="2"> [[File:Ambox glass.svg|30px|link=]]&nbsp; Snapshot: {{{name}}}&nbsp;</th></tr>
 
<tr><th colspan="2"> [[File:Ambox glass.svg|30px|link=]]&nbsp; Snapshot: {{{name}}}&nbsp;</th></tr>
 
<tr {{#if:{{{titles|}}}{{{other-names|}}}| class="cont" |}}><td {{#if:{{{datetype2|}}}{{{date2|}}} | | colspan"2"}}>'''{{#if:{{{datetype1|}}}|{{{datetype1}}}|Birth}}:''' {{{date1}}}, {{{loc1}}}</td>{{#if:{{{datetype2|}}}{{{date2|}}} | <td>'''{{#if:{{{datetype2|}}}|{{{datetype2}}}|Death}}:''' {{{date2}}}{{#if:{{{loc2|}}} |, {{{loc2}}} |}}</td> |}}</tr>
 
<tr {{#if:{{{titles|}}}{{{other-names|}}}| class="cont" |}}><td {{#if:{{{datetype2|}}}{{{date2|}}} | | colspan"2"}}>'''{{#if:{{{datetype1|}}}|{{{datetype1}}}|Birth}}:''' {{{date1}}}, {{{loc1}}}</td>{{#if:{{{datetype2|}}}{{{date2|}}} | <td>'''{{#if:{{{datetype2|}}}|{{{datetype2}}}|Death}}:''' {{{date2}}}{{#if:{{{loc2|}}} |, {{{loc2}}} |}}</td> |}}</tr>
Line 12: Line 12:
 
{{Snapshot person
 
{{Snapshot person
 
| name = (required)
 
| name = (required)
 +
| anchor = (optional; see note below)
 
| datetype1 = (if omitted, defaults to "birth"; options include flourished, lived, reigned, appeared, elected, death)
 
| datetype1 = (if omitted, defaults to "birth"; options include flourished, lived, reigned, appeared, elected, death)
 
| date1 = (at least one date is required)
 
| date1 = (at least one date is required)
Line 24: Line 25:
 
}}
 
}}
 
</pre>
 
</pre>
 +
This template also includes an optional <code>anchor</code> parameter that can be used to create quick wiki links. For example, including <code>| anchor = Johann Schmidt</code> allows for a quick link on the article like this: <code>[[Article#Johann Schmidt]]</code>. As with all wikilinks, this can be piped to create direct links in the encyclopedia directly to this snapshot (<code>[[Article#Johann Schmidt|Johann Schmidt]]</code>).
 +
 
[[Category:Snapshot templates]]
 
[[Category:Snapshot templates]]
 
</noinclude>
 
</noinclude>

Revision as of 17:34, 23 November 2022

This snapshot box is designed to highlight a specific person in the history of a territory. Provide a very brief overview of information in the paragraph parameter. Important: Please do not attempt to include a full-length article, as this template is not designed for it.

{{Snapshot person
| name = (required)
| anchor = (optional; see note below)
| datetype1 = (if omitted, defaults to "birth"; options include flourished, lived, reigned, appeared, elected, death)
| date1 = (at least one date is required)
| loc1 = location of first date if applicable
| datetype2 = (if omitted, defaults to "death"; options include flourished, disappeared, removed, and buried)
| date2 =
| loc2 = location of second date if applicable
| other-names =
| titles =
| portrait = (use without "File:")
| paragraph = (short overview paragraph to provide historical context)
}}

This template also includes an optional anchor parameter that can be used to create quick wiki links. For example, including | anchor = Johann Schmidt allows for a quick link on the article like this: Article#Johann Schmidt. As with all wikilinks, this can be piped to create direct links in the encyclopedia directly to this snapshot (Johann Schmidt).