Template:Campaignbox/doc: Difference between revisions

Jump to navigation Jump to search
imported>Kirill Lokshin
(Trim)
imported>Kirill Lokshin
Line 3: Line 3:
}}
}}
==== Campaignboxes ====  
==== Campaignboxes ====  
One common type of navigational template is the campaignbox template, which provides quick navigation among the battles in a [[military campaign|campaign]], [[theater (warfare)|theatre]], or war (or, more rarely, among several campaigns or wars).
One common type of navigational template is the campaignbox template, which provides quick navigation among the battles in a [[military campaign|campaign]], [[theater (warfare)|theatre]], or war (or, more rarely, among several campaigns or wars).


<div style="float: right; width: 320px; margin-bottom: 1em;">{{Campaignbox Second Punic War}}
<div style="float: right; width: 320px; margin-bottom: 1em;">{{Campaignbox Second Punic War}}
Line 15: Line 15:
{{Campaignbox XXXX}}
{{Campaignbox XXXX}}
</pre></div>
</pre></div>
For particular combinations of the relative sizes of the infobox and the lead section, the presence of a campaignbox may cause [[Wikipedia:How to fix bunched up edit links|bunched up edit links]].


Articles may include multiple campaignboxes (which are typically stacked following the infobox).  The most common scenario occurs when two levels of campaignboxes are present; for example, an article about a battle can include both a campaignbox listing the battle itself and an "enclosing" campaignbox listing the campaign, theater, or war during which the battle took place.  Similarly, an article about a war can include both a campaignbox listing the war (among a series of wars) and a campaignbox for the war itself, listing the battles that took place during it.
Articles may include multiple campaignboxes (which are typically stacked following the infobox).  The most common scenario occurs when two levels of campaignboxes are present; for example, an article about a battle can include both a campaignbox listing the battle itself and an "enclosing" campaignbox listing the campaign, theater, or war during which the battle took place.  Similarly, an article about a war can include both a campaignbox listing the war (among a series of wars) and a campaignbox for the war itself, listing the battles that took place during it.


; Creating campaignboxes
; Creating campaignboxes
A campaignbox template should be named ''Template:Campaignbox XXXX'', where XXXX is the name of the campaign (or a shortened form of it), and should use '''{{tl|campaign}}''', as shown below:
Existing campaignboxes may be viewed through the [[:Category:Campaignboxes|automatically-generated category]].  If a new one is necessary, it should be named ''Template:Campaignbox XXXX'', where XXXX is the name of the campaign (or a shortened form of it), and should use '''{{tl|campaign}}''', as shown below:


<div style="width:200px;background:#dddddd;border: 1px solid black;padding:0.5em  1em 0.5em 1em"><pre>
<div style="width:200px;background:#dddddd;border: 1px solid black;padding:0.5em  1em 0.5em 1em"><pre>
Line 31: Line 29:
</pre></div>
</pre></div>


* '''name''' – the name of the campaign or war, which should be linked to an article about the campaign if one exists.  Dates should not be indicated unless needed for clarity.  Note that long links may cause alignment problems; see [[WP:MILHIST#NAVPROBLEMS|the troubleshooting guide]] for a workaround.
* '''name''' – the name of the campaign or war, which should be linked to an article about the campaign if one exists.  Dates should not be indicated unless needed for clarity.  Note that long links may cause alignment problems; see [[WP:MILMOS#NAVPROBLEMS|the troubleshooting guide]] for a workaround.
* '''raw_name''' – the actual name of the created template (i.e. "Campaignbox XXX"); this can be easily produced by using <code><nowiki>{{subst:PAGENAME}}</nowiki></code>.
* '''raw_name''' – the actual name of the created template (i.e. "Campaignbox XXX"); this can be easily produced by using <code><nowiki>{{subst:PAGENAME}}</nowiki></code>.
* '''battles''' – a ''chronological,'' en-dash separated list of battles and operations in the campaign, linked as <code><nowiki>[[Battle of YYYY|YYYY]]</nowiki></code>; non-breaking spaces (<code>&amp;nbsp;</code>) should be used to ensure that multi-word names do not split over multiple lines.
* '''battles''' – a ''chronological,'' en-dash separated list of battles and operations in the campaign, linked as <code><nowiki>[[Battle of YYYY|YYYY]]</nowiki></code>; non-breaking spaces (<code>&amp;nbsp;</code>) should be used to ensure that multi-word names do not split over multiple lines.


For example:
The use of special formatting (such as bolding or changes in font size) in the list of battles—particularly to mark battles as "important"—is generally discouraged; while there are a ''few'' cases where such approaches may be both helpful to the reader and sufficiently well-sourced that they do not constitute original research, they are both unnecessary and confusing in most circumstances.  Similarly, dividing the list of battles into multiple blocks by inserting heading-like separations is not recommended in the average case; if such a division is needed, it is typically best accomplished by splitting the template into multiple campaignboxes.<noinclude>[[Category:WikiProject Military history template instructions|Campaignbox]]</noinclude><includeonly>{{#ifeq:{{{noheader|}}}|yes||
<div style="width: 500px; background: #dddddd; border: 1px solid black; padding: 0.5em 1em 0.5em 1em;"><pre>
{{campaign
| name    = [[Italian War of 1542-46]]
| raw_name = Campaignbox Italian War of 1542–1546
| battles  = [[Siege of Nice|Nice]] –
[[Battle of Ceresole|Ceresole]] –
[[Battle of Serravalle|Serravalle]] –
[[Siege of St. Dizier (1544)|St. Dizier]] –
[[Siege of Boulogne|Boulogne]] –
[[Battle of the Solent|Solent]]
}}
</pre></div>
 
The use of special formatting (such as bolding or changes in font size) in the list of battles—particularly to mark battles as "important"—is generally discouraged; while there are a ''few'' cases where such approaches may be both helpful to the reader and sufficiently well-sourced that they do not constitute original research, they are both unnecessary and confusing in most circumstances.   
 
Dividing the list of battles into multiple blocks by inserting heading-like separations is not recommended in the average case; if such a division is needed, it is typically best accomplished by splitting the template into multiple campaignboxes.
 
Articles other than those about military conflicts—such as those dealing with personnel or military units—may use the campaignbox formatting to create lists of battles or wars in which the subject participated.  In this case, the box should be created by including {{tl|campaign}} directly in the article, without creating a separate template.
 
Existing campaignboxes may be browsed through [[:Category:Campaignboxes]], which is automatically generated from the meta-template transclusion.<noinclude>[[Category:WikiProject Military history template instructions|Campaignbox]]</noinclude><includeonly>{{#ifeq:{{{noheader|}}}|yes||
[[Category:Military navigational boxes|Campaignbox]]
[[Category:Military navigational boxes|Campaignbox]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
}}</includeonly>
}}</includeonly>

Revision as of 03:05, 27 February 2008

Template:Template doc page

Usage

Campaignboxes

One common type of navigational template is the campaignbox template, which provides quick navigation among the battles in a campaign, theatre, or war (or, more rarely, among several campaigns or wars).

The campaignbox should generally be included directly after the infobox template, if one is present:

{{Infobox Military Conflict
...
}}
{{Campaignbox XXXX}}

Articles may include multiple campaignboxes (which are typically stacked following the infobox). The most common scenario occurs when two levels of campaignboxes are present; for example, an article about a battle can include both a campaignbox listing the battle itself and an "enclosing" campaignbox listing the campaign, theater, or war during which the battle took place. Similarly, an article about a war can include both a campaignbox listing the war (among a series of wars) and a campaignbox for the war itself, listing the battles that took place during it.

Creating campaignboxes

Existing campaignboxes may be viewed through the automatically-generated category. If a new one is necessary, it should be named Template:Campaignbox XXXX, where XXXX is the name of the campaign (or a shortened form of it), and should use {{campaign}}, as shown below:

{{campaign
| name     =
| raw_name =
| battles  =
}}
  • name – the name of the campaign or war, which should be linked to an article about the campaign if one exists. Dates should not be indicated unless needed for clarity. Note that long links may cause alignment problems; see the troubleshooting guide for a workaround.
  • raw_name – the actual name of the created template (i.e. "Campaignbox XXX"); this can be easily produced by using {{subst:PAGENAME}}.
  • battles – a chronological, en-dash separated list of battles and operations in the campaign, linked as [[Battle of YYYY|YYYY]]; non-breaking spaces (&nbsp;) should be used to ensure that multi-word names do not split over multiple lines.

The use of special formatting (such as bolding or changes in font size) in the list of battles—particularly to mark battles as "important"—is generally discouraged; while there are a few cases where such approaches may be both helpful to the reader and sufficiently well-sourced that they do not constitute original research, they are both unnecessary and confusing in most circumstances. Similarly, dividing the list of battles into multiple blocks by inserting heading-like separations is not recommended in the average case; if such a division is needed, it is typically best accomplished by splitting the template into multiple campaignboxes.