Template:Campaignbox/doc: Difference between revisions
imported>Kirill Lokshin (This is actually nested at a deeper level for transclusion into WP:MILMOS, so make header depth variable) |
imported>Magicpiano (update to cover all parameters the template uses) |
||
Line 12: | Line 12: | ||
<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}} | ||
{{Campaignbox Punic Wars}}</div> | {{Campaignbox Punic Wars}}</div> | ||
The campaignbox should generally be included directly after the infobox template, if one is present: | The campaignbox should generally be included directly after the infobox template (or in its campaignbox parameter, if {{tl|infobox military conflict}} is used), if one is present: | ||
<div style="width: 300px; background: #ddd; border: 1px solid black; padding: 0.5em 1em;"><pre> | <div style="width: 300px; background: #ddd; border: 1px solid black; padding: 0.5em 1em;"><pre> | ||
Line 19: | Line 19: | ||
}} | }} | ||
{{campaignbox XXXX}} | {{campaignbox XXXX}} | ||
{{infobox military conflict | |||
... | |||
|campaignbox={{campaignbox XXXX}} | |||
}} | |||
</pre></div> | </pre></div> | ||
Line 39: | Line 44: | ||
; battles: A chronological list of battles and operations in the campaign, linked as <code><nowiki>[[Battle of YYYY|YYYY]]</nowiki></code>. Assigning <code>bodyclass=hlist</code> or <code>listclass=hlist</code> provides an provides a convenient and accessible method for separating the items; just use standard <tt>*</tt> bulleted list format. | ; battles: A chronological list of battles and operations in the campaign, linked as <code><nowiki>[[Battle of YYYY|YYYY]]</nowiki></code>. Assigning <code>bodyclass=hlist</code> or <code>listclass=hlist</code> provides an provides a convenient and accessible method for separating the items; just use standard <tt>*</tt> bulleted list format. | ||
; notes: (''optional'') Any needed explanatory notes for the list of operations; this field should be used sparingly. | ; notes: (''optional'') Any needed explanatory notes for the list of operations; this field should be used sparingly. | ||
; raw_name: (''optional'', ''deprecated'') This parameter is present for backward compatibility, and overrides the use of the name and title in determining the template name. In creating a new campaignbox, both title and name should be specified, and this parameter should be omitted. | |||
The following optional parameters are passed on to {{tl|Military navigation}} or {{tl|navbox}}, and affect the styling of the template. See their documentation pages for further details: | |||
; state: whether the box is fully visible or not | |||
; bodyclass: CSS style for the box body | |||
; listclass: CSS style for the box list | |||
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> | 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> |
Revision as of 14:26, 27 January 2012
File:Edit-copy green.svg | Template:Strong for Template:Terminate sentence It contains usage information, categories and other content that is not part of the original template 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 (or in its campaignbox parameter, if {{infobox military conflict}} is used), if one is present:
{{infobox military conflict ... }} {{campaignbox XXXX}} {{infobox military conflict ... |campaignbox={{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 = | title = | battles = | notes = }}
- name
- The actual name of the created template (i.e. "Campaignbox XXX"); this can be produced by using
{{subst:PAGENAME}}
. - title
- 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.
- battles
- A chronological list of battles and operations in the campaign, linked as
[[Battle of YYYY|YYYY]]
. Assigningbodyclass=hlist
orlistclass=hlist
provides an provides a convenient and accessible method for separating the items; just use standard * bulleted list format. - notes
- (optional) Any needed explanatory notes for the list of operations; this field should be used sparingly.
- raw_name
- (optional, deprecated) This parameter is present for backward compatibility, and overrides the use of the name and title in determining the template name. In creating a new campaignbox, both title and name should be specified, and this parameter should be omitted.
The following optional parameters are passed on to {{Military navigation}} or {{navbox}}, and affect the styling of the template. See their documentation pages for further details:
- state
- whether the box is fully visible or not
- bodyclass
- CSS style for the box body
- listclass
- CSS style for the box list
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.