Template:Campaignbox/doc: Difference between revisions
en>SWinxy m add redirect |
m 1 revision imported |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{#ifeq:{{{noheader|}}}|yes | | {{#ifeq:{{{noheader|}}}|yes | | ||
| {{Documentation subpage}} | | {{Documentation subpage}} | ||
{{High-use}} | |||
{{Template display|nomobile}} | {{Template display|nomobile}} | ||
{{lua|Module:Military navigation}} | |||
{{Template redirect|Campaign}} | {{Template redirect|Campaign}} | ||
{{Navbox visibility}} | {{Navbox visibility}} | ||
== Usage == | == Usage == | ||
}} | }} | ||
| Line 21: | Line 24: | ||
If the article includes an [[Help:Infobox|infobox]], the campaignbox/es are usually placed immediately after it (i.e. just below it). If available, as with infoboxes such as {{tl|Infobox military conflict}}, use the infobox's {{para|campaignbox}} parameter: | If the article includes an [[Help:Infobox|infobox]], the campaignbox/es are usually placed immediately after it (i.e. just below it). If available, as with infoboxes such as {{tl|Infobox military conflict}}, use the infobox's {{para|campaignbox}} parameter: | ||
< | <syntaxhighlight lang="wikitext"> | ||
{{Infobox military conflict | {{Infobox military conflict | ||
... | ... | ||
}} | }} | ||
{{Campaignbox XXXX}} | {{Campaignbox XXXX}} | ||
</ | </syntaxhighlight> | ||
or | |||
<syntaxhighlight lang="wikitext"> | |||
{{Infobox military conflict | {{Infobox military conflict | ||
... | ... | ||
| campaignbox = {{campaignbox XXXX}} | | campaignbox = {{campaignbox XXXX}} | ||
}} | }} | ||
</ | </syntaxhighlight> | ||
Articles may include multiple campaignboxes; typically, these are stacked under 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; typically, these are stacked under 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. | ||
| Line 39: | Line 43: | ||
Existing campaignboxes may be viewed through the [[:Category:Campaignbox templates|Campaignbox template category]] to which campaignboxes are added automatically. If a new campaignbox becomes necessary, it should be named ''Template:Campaignbox XXXX'' (where XXXX is the (shortened) name of the campaign) and should use {{tlf|Campaignbox}} thus: | Existing campaignboxes may be viewed through the [[:Category:Campaignbox templates|Campaignbox template category]] to which campaignboxes are added automatically. If a new campaignbox becomes necessary, it should be named ''Template:Campaignbox XXXX'' (where XXXX is the (shortened) name of the campaign) and should use {{tlf|Campaignbox}} thus: | ||
< | |||
<syntaxhighlight lang="wikitext"> | |||
{{Campaignbox | {{Campaignbox | ||
| name = | | name = | ||
| Line 47: | Line 51: | ||
| notes = | | notes = | ||
}} | }} | ||
</ | </syntaxhighlight> | ||
==== Parameters ==== | ==== Parameters ==== | ||
{{#ifeq:{{BASEPAGENAME}}|Campaignbox||'''Note:''' These parameters are for {{tl|Campaignbox}}.<br /><br />}} | |||
; ''name'' : The name by which Wikipedia refers to the template, i.e. "Template:Campaignbox XXXX". This can be produced by using <code><nowiki>{{subst:PAGENAME}}</nowiki></code>. | ; ''name'' : The name by which Wikipedia refers to the template, i.e. "Template:Campaignbox XXXX". This can be produced by using <code><nowiki>{{subst:PAGENAME}}</nowiki></code>. | ||
; ''title'' : The name of the campaign or war, which, if an article about the campaign or war exists, should link to it. 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 more information. | ; ''title'' : The name of the campaign or war, which, if an article about the campaign or war exists, should link to it. 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 more information. | ||