Difference between revisions of "Template:Succession"
(Formatting) |
(Remove date links, although it could probably be simplified further now.) |
||
| (19 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | {| | + | <noinclude>{| class="wikitable"</noinclude>{{#if:{{{hdg|}}} |
| + | |{{!-}} | ||
| + | !colspan="2" {{#if:{{{term|}}}|style="border-bottom:none; padding-bottom:0"}}{{!}}{{{hdg}}}}} | ||
| + | {{#if:{{{term|}}} | ||
| + | |{{!-}} | ||
| + | !colspan="2" style="font-weight:normal; font-size:80%; {{#if:{{{hdg|}}}|border-top:none; padding-top:0|}}"{{!}}(Term {{{term}}}) | ||
| + | }} | ||
| + | |- | ||
| + | |From||{{2if1|{{{start-date|}}}|{{{start-date}}}}} {{2if1|{{{start-year|}}}|{{{start-year}}}}} | ||
|- | |- | ||
| − | + | |To||{{2if1|{{{end-date|}}}|{{{end-date}}}}} {{2if1|{{{end-year|}}}|{{{end-year}}}}} | |
| − | {{ | ||
|- | |- | ||
| − | |Succeeded||{{{ | + | |Succeeded||{{#if:{{{prev-raw|}}}|{{{prev-raw}}}|{{#if:{{{prev|}}}|[[{{{prev}}}]]|—}}}} |
|- | |- | ||
| − | |Preceded||{{{ | + | |Preceded||{{#if:{{{next-raw|}}}|{{{next-raw}}}|{{#if:{{{next|}}}|[[{{{next}}}]]|—}}}} |
| − | + | <noinclude>|} | |
{{TemplateDoc|pages=Articles, inside infoxes|purpose=Succession links in infoboxes}} | {{TemplateDoc|pages=Articles, inside infoxes|purpose=Succession links in infoboxes}} | ||
{{Parms| | {{Parms| | ||
| − | {{parm|hdg|Heading of this section of infobox| | + | {{parm|hdg|Heading of this section of infobox|no|}} |
| − | {{parm| | + | {{parm|term|n-th term of office|no}} |
| − | {{parm| | + | {{parm|start-date|Date (not year) of start of term|no|}} |
| + | {{parm|start-year|Year of start of term|no|}} | ||
| + | {{parm|end-date|Date (not year) of end of term|no|}} | ||
| + | {{parm|end-year|Year of end of term|no|}} | ||
| + | {{parm|prev|Previous person in this succession|no|Defaults to a dash}} | ||
| + | {{parm|prev-raw|Previous person in this succession|no|See note A}} | ||
| + | {{parm|next|Next person in this succession|no|Defaults to a dash}} | ||
| + | {{parm|next-raw|Next person in this succession|no|See note A}} | ||
}} | }} | ||
| − | + | '''NOTE A:''' Parameters of the form xxxx-raw are alternatives to the non-raw form. These should be used ''instead of'' the non-raw form to (a) provide links where the article name is different to the displayed name, or (b) where a link is not wanted. For example, if the capital of a country is ''Washington'', but the page name for that capital is ''Washington D.C.'', then you would type {{tt|<nowiki>capital-raw=[[Washington D.C.|Washington]]</nowiki>}}. If, instead, the page name is simply ''Washington'', then {{tt|<nowiki>capital=Washington</nowiki>}} is all that is needed, and will automatically be linked. If both non-raw and raw forms are supplied, the non-raw form will be ignored. | |
| − | |||
</noinclude> | </noinclude> | ||
Latest revision as of 01:52, November 26, 2007
| From | |
| To | |
| Succeeded | — |
| Preceded | — |
| Template: Succession | |
|---|---|
| Use on | Articles, inside infoxes |
| Use for | Succession links in infoboxes |
| Category template applies to page | (none) |
| Template Parameters (See using templates). | |||
|---|---|---|---|
| Name | Purpose | Required? | Comment |
| hdg | Heading of this section of infobox | no | |
| term | n-th term of office | no | |
| start-date | Date (not year) of start of term | no | |
| start-year | Year of start of term | no | |
| end-date | Date (not year) of end of term | no | |
| end-year | Year of end of term | no | |
| prev | Previous person in this succession | no | Defaults to a dash |
| prev-raw | Previous person in this succession | no | See note A |
| next | Next person in this succession | no | Defaults to a dash |
| next-raw | Next person in this succession | no | See note A |
NOTE A: Parameters of the form xxxx-raw are alternatives to the non-raw form. These should be used instead of the non-raw form to (a) provide links where the article name is different to the displayed name, or (b) where a link is not wanted. For example, if the capital of a country is Washington, but the page name for that capital is Washington D.C., then you would type capital-raw=[[Washington D.C.|Washington]]. If, instead, the page name is simply Washington, then capital=Washington is all that is needed, and will automatically be linked. If both non-raw and raw forms are supplied, the non-raw form will be ignored.