Template:Military navigation/doc

Navigation templates
The various navigation templates maintained by the Military history WikiProject are all intended to be implemented through a single base template, which combines the project's common template style with the standard navigation box format. This is needed primarily to allow multiple such templates to be stacked together—with each other, or with infobox templates—to present the appearance of a continuous block; it is also beneficial for providing a consistent appearance to the entire set of articles within our scope.

Any military-related navigational template should be created using the Military navigation base template, as shown below:


 * style – optional – an alternative style for the template; this may be set to "wide" to produce a full-width box. The alternative style should be used sparingly; it is intended that the majority of navigational templates will use the default style.  The above example template formatted with   is shown below:


 * odd_color/even_color – optional – the stripe colors for alternating listN items to use. These parameters should be used sparingly; in the absence of a good reason to do otherwise, templates should use the default stripe colors.
 * state – optional – may be set to "collapsed" to force the template to render in its closed state by default.
 * raw_name – the actual page name (i.e. "XYZ" for Template:XYZ) of the newly-created template.
 * title – the displayed title of the navigation box.
 * groupN/listN – the body of the navigation box, consisting of successive horizontal blocks of content (the listN fields) with optional labels (the corresponding groupN fields). Please see the documentation for navbox for more details on the different layouts possible.
 * above – optional – the sub-header of the navigation box; please see the documentation for navbox for more details on the resulting layout when this is used.
 * below – optional – the footer of the navigation box; please see the documentation for navbox for more details on the resulting layout when this is used.
 * image – optional – an image to be displayed at the right of the box, given in the form .  This parameter should be used sparingly, and typically only in conjunction with the full-width template style.

Common problems with navigation templates
There are several known issues with the current navigation template design that editors should be aware of:


 * Bunched-up edit links : If several infoboxes or navigation templates are stacked along the right margin of an article, the [edit] links of nearby sections may be moved to unexpected positions. A number of workarounds exist; full details are available on the linked page.
 * Shifted header wrapping : A long header used in a narrow navigation template may wrap incorrectly, with the second line being indented further than necessary. A workaround is possible by adding a pbrk tag between the words where the wrapping occurs.  Note that if the header is a single link, the portion after the break will no longer be linked if this is done; to fix this, a separate link must be used, as follows:  Articletitle .
 * Stretching boxes : A very long header formatted as a single link may cause a template to stretch beyond its normal width. A workaround is possible by breaking the header onto multiple lines, as shown above.