User:Pee Tern/Sandbox/Template/Infobox Law enforcement agency/doc master

Purpose
Infobox  is an infobox template for use in articles on individual.

The template provides an overview of key: of.
 * structural
 * jurisdictional
 * operational characteristics

Automatic categorisation
This template automatically categorises the article it is placed into. An including article will be categorised into one or more categories according to the of the Law Enforcement Wikiproject. These categories will be set if the law enforcement agency's relevant parameter values are used in the template.

The template allows for country names which are usually preempted with a 'the' for example specifying United Kingdom will result in the template using the United Kingdom. Do not specify the/The United Kingdom as a parameter value.

The template allows for some common category naming which does not comply to the above standard, for example, using in instead of of, and putting the State name first as in 'state' .

Cautions
If a new combination of paramters is used, then the expected category for automatic categorisation might not exist. If so, manually create the necessary category. This is a once off process. See also Deficiencies - Automatic categorisation below.

There might be problems when (very) non standard naming conventions have been used for existing categories. These non standard named categories will slowly disappear over time and become deprecated, being replaced by standard named ones.

Parameter checking
This template does NOT cross check parameters for nonsensical combinations of parameters or missing mandatory parameters.

Acknowledgements
This template was initially inspired by {{Infobox Government agency}, February 2008.

Usage
The following skeleton can be copied and edited into an article. For a description of each parameter, see Template parameters, below.

The skeleton contains some abbreviations for the sake of brevity and these are not actual wiki text. Accordingly they need to be edited or removed as follows: See the examples below for how the skeleton will look after being copied and edited.
 * Remove the ' . . up to N' comments altogether.
 * Replace the template list sub skeletons, for example as shown for the international parameter, with a list of names, or with the number of things.

Skeleton
{{#switch:{{{agencyclass|}}} |agencyclass2   = (...up to 3...) |agencyname     = |nativename     = |nativenamea    = |nativenamer    = |commonname     = |abbreviation   = |fictional      = |patch          = |patchcaption   = |logo           = |logocaption    = |badge          = |badgecaption   = |flag           = |flagcaption    = |imagesize      = |motto          = |mottotranslated = |mission        = |formedyear     = |formedmonthday = |preceding1     = (...up to 6...) |dissolved      = |superseding    = |employees      = |volunteers     = |budget         = |legalpersonality = |country        = |countryabbr    = |national       = |federal        = |international  = NNN or {{collapsible list |title=NNN |country1. . |countryNNN}} |divtype        = |divname        = |divdab         = |subdivtype     = |subdivname     = |subdivdab      = |map            = |mapcaption     = |sizearea       = |sizepopulation = |legaljuris     = |governingbody  = |governingbodyscnd = |constitution1  = (...up to 6...) |police         = |local          = |sheriff        = |military       = |provost        = |gendarmerie    = |religious      = |speciality1    = (...up to 6...) |secret         = |overviewtype   = |overviewbody   = |headquarters   = |hqlocmap       = |hqlocmapwidth  = |hqlocmapheight = |hqlocmapborder = |hqlocleft      = |hqloctop       = |hqlocmappoptitle = |sworntype      = |sworn          = |unsworntype    = |unsworn        = |multinational  = NNN or {{collapsible list |title=NNN |country1. . |countryNNN}} |electeetype    = |minister1name  = |minister1pfo   = (...up to 6...) |chief1name     = |chief1position = (...up to 6...) |parentagency   = |child1agency   = (...up to 6...) |unittype       = |unitname       = NNN or {{collapsible list |title=NNN |Unit1. . |UnitNNN}} |officetype     = |officename     = NNN or {{collapsible list |title=NNN |Office1. . |OfficeNNN}} |provideragency = |uniformedas    = |stationtype    = |stations       = NNN or {{collapsible list |title=NNN |Station1. . |StationNNN}} |airbases       = NNN or {{collapsible list |title=NNN |Airbase1. . |AirbaseNNN}} |lockuptype     = |lockups        = NNN or {{collapsible list |title=NNN |Lockup1. . |LockupNNN}} |vehicle1type   = |vehicles1      = NNN or {{collapsible list |title=NNN |Vehicle1. . |VehicleNNN}} } (...up to 3...) |boat1type      = |boats1         = NNN or {{collapsible list |title=NNN |Boat1. . |BoatNNN}} (...up to 3...) |aircraft1type  = |aircraft1      = NNN or {{collapsible list |title=NNN |Aircraft1. . |AircraftNNN}} (...up to 3...) |animal1type    = |animals1       = NNN or {{collapsible list |title=NNN |Animal1. . |AnimalNNN}} (...up to 3...) |person1name    = |person1reason  = |person1type    = (...up to 6...) |programme1     = (...up to 6...) |activity1name  = (...up to 6...) |activitytype   = |anniversary1   = (...up to 6...) |award1         = (...up to 6...) |website        = |footnotes      = |reference      = }}
 * enforcement = {{ Infobox law enforcement agency
 * correction = {{ Infobox Corrections agency
 * probation  = {{ Infobox Probation agency
 * {{ Unknown agency class}}

Information box width
Some articles may benefit from having a narrower information box than the one generated by default.

Adding will reduce the width of the generated information box.
 * narrowerbox    = Yes

This might cause the length of the generated information box to increase, due to increased text wrap within table cells in the information box. Editors should take care to check the presentation of the information box if they add or remove this parameter.

Alternative skeleton
Use this alternative if you prefer a skeleton with underscored parameter names instead of concatenated parameter names.

Example usage
The text of the presented template instantiations in the examples below has been manually wrapped to get a better fit in the browser frame. Do not add unnecessay new lines when using the template. Varying frame width and screen resolution, then you might still get "overflow" from one example to the next example, etc., when viewing this documentation.

New York Police Department


A free use image has been substituted for the actual patch.

This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

Ministry of Public Security


This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

Lincolnshire Police (a snapshot information box example)


A free use image has been substituted for the actual badge.

This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

For details on how to set up a snapshot information box, see Snapshot information boxes below.

Europol


This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

Australian Federal Police


This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

Parameter test


This text has been manually and artificially wrapped for presentation purposes. Do not add any unnecessary new lines when using the template.

Notes for template editors
This documentation applies to templates for three classes of agency within criminal justice and social order sytems:
 * Law enforcment agencies
 * Corrections agencies
 * Probation agencies

The documentation is configured from by setting the parameter agencyclass to one of 'enforcement', 'correction', or 'probation'. The corresponding documentation and entry point template,, , must have the same agencyclass value as each other.

Snapshot information boxes
To put a snapshot copy of the information box from a main article for a law enforcement agency in an article related to the law enforcement agency:
 * 1) Instead of adding the template to the law enforcement agency's (main) article, create a new template using the Infobox law enforcement agency template, for example Template:Foo City Police.
 * 2) Copy the following parameter instantiations into the Infobox law enforcement agency template call in Template:Foo City Police: | sharedcat  = Foo City Police | infotype    =   | subname     =   | doc         =  
 * 3) Create the category Category:Foo City Police, so that all articles related to Foo City Police can be categorised together. The categorisation of the main and related articles will then be done automatically by the template.
 * 4) Add   to the main article for Foo City Police.
 * 5) Add   to the articles related to Foo City Police.
 * 6) Also, for example, include: | subname    = Training Academy in the Foo City Police Training Academy article to properly place the article within the Foo City Police category page.

Also categorise the new Foo City Police template into Category:Snapshotinfoboxes for law enforcement agencies.

If any images for patch, logo, badge, flag are provided, then the first image in this list is placed in the noncollapsible section of the infobox and any further images are placed in the collapsible section of the infobox by the template.

Usage for snapshot information boxes
Usage for the Foo City Police snapshot information box template will be:

This is available via.

Automatic categorisation
The automatic bulk categorisation is done by the sub template User:Pee Tern/Sandbox/Template/Infobox Law enforcement agency/autocat.

The automatic single categorisation, for a snapshot information box, is done in the main template.

Automatic categorisation can be turned off by setting the doc parameter to any value. This parameter is not documented above, and is not for use in articles. The doc parameter should only be used for documentation purposes, for example in the template use examples to turn off categorisation of the documentation and the template, etc.

If the template cannot find a geographic category for the article, country sub division, country division, or country, then the article is placed in to the hidden category Category:Law enforcement agency articles with no available geographic category.

Automatic categorisation is driven by certain parameters. If subdivtype is set to 'town' or 'city' then the template will try to categorise the article as a municipal agency.

Automatic disambiguation
The automatic disambiguation is done by the sub template User:Pee Tern/Sandbox/Template/Infobox Law enforcement agency/paramdab:
 * . Only parameter 2 is mandatory.

A disambiguable parameter, param, will be disambiguated by the template if possible.

A disambiguable parameter, param, can have its disambiguation set by using the corresponding parameter, paramdab.

The template will try, in order:
 * 1) param
 * 2) param
 * 3) param
 * 4) param
 * 5) param
 * 6) param

If there is no link available the article is placed into the hidden category Category:Law enforcement agency articles with no operations jurisdiction link.

Regression testing
To assist in the testing of changes to existing parameters, temporarily add the following to the entry point template:

This will allow the quick checking of articles which use the relevant parameter via the hidden category Category:Infobox Law enforcement agency parameter use.

Checklists for template editors
Adding or modifying a parameter:
 * Add a new parameter to the copy skeleton under usage.
 * Update or create a relevant example, both the non tagged and  tagged material.
 * Update the parameters table.
 * Update the parameter test.
 * Update the automatic categorisation and User:Pee Tern/Sandbox/Template/Infobox Law enforcement agency/autocat if appropriate.
 * Update the deficiencies if appropriate
 * Update this check list if appropriate.

Template administration categories
The following are hidden categories which are used to help administer this template:
 * Category:Infobox Law enforcement agency parameter use
 * Category:Law enforcement agency articles with no operations jurisdiction link
 * Category:Law enforcement agency articles with no available geographic category