வார்ப்புரு:Infobox law enforcement agency/autocat
&lt;noinclude&gt;This template automatically categorises articles.  It is a sub template for [[வார்ப்புரு:Infobox law enforcement agency]]&lt;/noinclude&gt;&lt;includeonly&gt;&lt;!--
 
 Fictional
 --&gt;{{#if: {{{fictional|}}}&lt;!--
 --&gt;    |[[Category:Fictional law enforcement agencies]]&lt;!--
 
 Country parameter
 --&gt;    |{{#if: {{{country|}}}&lt;!--
 
 Defunct
 --&gt;         |{{#if: {{{defunct|}}}
                  |{{#if:{{{divname|}}}
                       |{{#ifexist: Category:Defunct law enforcement agencies of {{{divname}}}, {{{country}}}&lt;!--The standard--&gt;
                            |[[Category:Defunct law enforcement agencies of {{{divname}}}, {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: Category:Defunct law enforcement agencies of {{{divname}}}, the {{{country}}}
                                 |[[Category:Defunct law enforcement agencies of {{{divname}}}, the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                 |{{#ifexist: Category:Defunct law enforcement agencies of {{{divname}}} ({{{countryabbr|}}} {{{divtype|}}})
                                      |[[Category:Defunct law enforcement agencies of {{{divname}}} ({{{countryabbr|}}} {{{divtype|}}}){{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                      |{{#ifexist: Category:Defunct law enforcement agencies of {{{divname}}} ({{{divtype|}}})
                                           |[[Category:Defunct law enforcement agencies of {{{divname}}} ({{{divtype|}}}){{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                           |{{#ifexist: Category:Defunct law enforcement agencies of {{{divname}}}
                                                |[[Category:Defunct law enforcement agencies of {{{divname}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                |{{#ifexist: Category:Defunct law enforcement agencies of {{{country}}}&lt;!--The standard--&gt;
                                                     |[[Category:Defunct law enforcement agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                     |[[Category:Defunct law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                 }}
                                            }}
                                       }}
                                  }}
                             }}
                        }}
                       |{{#ifexist: Category:Defunct law enforcement agencies of {{{country}}}&lt;!--The standard--&gt;
                            |[[Category:Defunct law enforcement agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: [[Category:Defunct law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]] | [[Category:Defunct law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]] | }}
                        }}
                   }}&lt;!--
 
 Not defunct
 --&gt;              |&lt;!--
 
 National
 --&gt;               {{#if: {{{national|}}}
                       |{{#ifexist: Category:National law enforcement agencies of {{{country}}}&lt;!--The standard--&gt;
                            |[[Category:National law enforcement agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: [[Category:National law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]] | [[Category:National law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]] | }}
                         }}
                   }}&lt;!--  end National
 
 Federal
 --&gt;               {{#if: {{{federal|}}}
                       |{{#ifexist: Category:Federal law enforcement agencies of {{{country}}}&lt;!--The standard--&gt;
                            |[[Category:Federal law enforcement agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: Category:Federal law enforcement agencies of the {{{country}}}
                                 |[[Category:Federal law enforcement agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                 |{{#ifexist: Category:{{{country}}} federal law enforcement agencies&lt;!--If only people would stick to the standard--&gt;
                                      |[[Category:{{{country}}} federal law enforcement agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                      |[[Category:Federal law enforcement agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]&lt;!--Resort to the standard--&gt;
                                  }}
                             }}
                        }}
                   }}&lt;!--  end Federal
 
 Sub division / Division / Country
 
 --&gt;{{#if:{{{federal|}}}{{{national|}}}
   |&lt;!--  geography categorisation is not relevant  --&gt;|
 {{#switch:{{{agencyclass|}}}
 |corrections=
 {{Infobox law enforcement agency/autocat geography
 |subdivtype     = {{{subdivtype|}}}
 |subdivcatspcl  =
 |subdivcat      = {{Infobox law enforcement agency/autocat subdivision  |words=corrections agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} |subdivtype={{{subdivtype|}}} |subdivname={{{subdivname|}}} }}
 |divtype        = {{{divtype|}}}
 |divcatspcl     =
 |divcat         = {{Infobox law enforcement agency/autocat division     |words=corrections agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |typedivcatspcl =
 |typedivcat     = {{Infobox law enforcement agency/autocat typedivision |words=corrections agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |countrycat     = {{Infobox law enforcement agency/autocat country      |words=corrections agencies |country={{{country}}} }}
 |commonname     = {{{commonname|}}}
 }}
 |probation=
 {{Infobox law enforcement agency/autocat geography
 |subdivtype     = {{{subdivtype|}}}
 |subdivcatspcl  =
 |subdivcat      = {{Infobox law enforcement agency/autocat subdivision  |words=probation agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} |subdivtype={{{subdivtype|}}} |subdivname={{{subdivname|}}} }}
 |divtype        = {{{divtype|}}}
 |divcatspcl     =
 |divcat         = {{Infobox law enforcement agency/autocat divivision   |words=probation agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |typedivcatspcl =
 |typedivcat     = {{Infobox law enforcement agency/autocat typedivision |words=probation agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |countrycat     = {{Infobox law enforcement agency/autocat country      |words=probation agencies |country={{{country}}} }}
 |commonname     = {{{commonname|}}}
 }}
 |enforcement=
 {{#ifexpr: {{#ifeq:{{lc:{{{country}}}}}|united states|1|0}} AND {{#if:{{{speciality1|}}}{{{speciality2|}}}{{{speciality3|}}}{{{speciality4|}}}{{{speciality5|}}}{{{speciality6|}}}|1|0}}
   |&lt;!--  do not geography categorise here - combined specialist geography categorisation done later  --&gt;|
 {{Infobox law enforcement agency/autocat geography
 |subdivtype     = {{{subdivtype|}}}
 |subdivcatspcl  = {{#if:{{{police|}}}|{{Infobox law enforcement agency/autocat subdivision |words={{#switch:{{lc:{{{country}}}}}|united states=police departments|police forces}} |country={{{country}}} |countryabbr={{{countryabbr|}}} |divtype={{{divtype|}}} |divname={{{divname|}}} |subdivtype={{{subdivtype|}}} |subdivname={{{subdivname|}}} }}}}
 |subdivcat      = {{Infobox law enforcement agency/autocat subdivision  |words=law enforcement agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} |subdivtype={{{subdivtype|}}} |subdivname={{{subdivname|}}} }}
 |divtype        = {{{divtype|}}}
 |divcatspcl     = {{#if:{{{police|}}}|{{Infobox law enforcement agency/autocat division    |words={{#switch:{{lc:{{{country}}}}}|united states=police departments|police forces}} |country={{{country}}} |countryabbr={{{countryabbr|}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}}}
 |divcat         = {{Infobox law enforcement agency/autocat division     |words=law enforcement agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |typedivcatspcl =
 |typedivcat     = {{Infobox law enforcement agency/autocat typedivision |words=law enforcement agencies |country={{{country}}} |countryabbr={{{countryabbr}}} |divtype={{{divtype|}}} |divname={{{divname|}}} }}
 |countrycat     = {{Infobox law enforcement agency/autocat country      |words=law enforcement agencies |country={{{country}}} }}
 |commonname     = {{{commonname|}}}
 }}
 }}
 |&lt;!--  no default geographic categoristion for agency class (at this time)  --&gt;
 }}
 }}&lt;!--  end Sub division / Division / Country  --&gt;
              }}&lt;!--  end Defunct  --&gt;
         }}&lt;!--  end Country parameter
 
 Specialist
 --&gt;     {{#if: {{{speciality1|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality1}}} }} }}&lt;!--
 
 --&gt;     {{#if: {{{speciality2|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality2}}} }} }}&lt;!--
 
 --&gt;     {{#if: {{{speciality3|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality3}}} }} }}&lt;!--
 
 --&gt;     {{#if: {{{speciality4|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality4}}} }} }}&lt;!--
 
 --&gt;     {{#if: {{{speciality5|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality5}}} }} }}&lt;!--
 
 --&gt;     {{#if: {{{speciality6|}}} | {{Infobox law enforcement agency/autocat specialist
 |defunct    = {{{defunct|}}}
 |country    = {{{country|}}}
 |countryabbr = {{{countryabbr|}}}
 |commonname = {{{commonname|}}}
 |divtype    = {{{divtype|}}}
 |divname    = {{{divname|}}}
 |police     = {{{police|}}}
 |speciality = {{{speciality6}}} }} }}&lt;!--
 
 International
 --&gt;     {{#if: {{{international|}}} |[[Category:International law enforcement agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]}}&lt;!--
 
 Multinational
 --&gt;     {{#if: {{{multinational|}}} |[[Category:Multinational law enforcement agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]}}&lt;!--
 
 Civilian police
 --      (CFD 2008 Apr 9)  --
 
 Secret police
 --&gt;     {{#if: {{{secret|}}}
             |{{#ifexist: Category:Secret police agencies
                  |[[Category:Secret police agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]&lt;!-- The standard  --&gt;
                  |[[Category:Secret police{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
              }}
         }}&lt;!--  end Secret
 
 Military
 --&gt;     {{#if: {{{military|}}}{{{provost|}}}{{{gendarmerie|}}}
             |{{#if: {{{gendarmerie|}}}
              &lt;!-- Gendarmerie --&gt;
                  |{{#ifexist: Category:Gendarmerie of {{{country|}}}&lt;!-- The standard --&gt;
                       |[[Category:Gendarmerie of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                       |{{#ifexist: Category:Gendarmerie of the {{{country|}}}
                            |[[Category:Gendarmerie of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |[[Category:Gendarmerie{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                        }}
                   }}&lt;!--  end Gendarmerie --&gt;
             |{{#if: {{{provost|}}}
              &lt;!-- Military Provost --&gt;
                  |{{#if:{{{country|}}}|
                   {{#ifexist: Category:Military provosts of {{{country}}}&lt;!-- The standard --&gt;
                       |[[Category:Military provosts of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                       |{{#ifexist: Category:Military provosts of the {{{country}}}
                            |[[Category:Military provosts of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: Category:{{{country}}} military provosts
                                 |[[Category:{{{country}}} military provosts{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                 |&lt;!-- No military provost category so try military police instead --&gt;
                                  {{#ifexist: Category:Military police agencies of {{{country}}}&lt;!-- The standard --&gt;
                                      |[[Category:Military police agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                      |{{#ifexist: Category:Military police agencies of the {{{country}}}
                                           |[[Category:Military police agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                           |{{#ifexist: Category:{{{country}}} military police agencies
                                                |[[Category:{{{country}}} military police agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                |{{#ifexist: Category:Military police of {{{country}}}
                                                     |[[Category:Military police of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                     |{{#ifexist: Category:Military police of the {{{country}}}
                                                          |[[Category:Military police of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                          |{{#ifexist: Category:{{{country}}} military police
                                                               |[[Category:{{{country}}} military police{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                               |[[Category:Military police agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]&lt;!-- Resort to the standard --&gt;
                                                           }}
                                                     }}
                                                }}
                                           }}
                                       }}
                                  }}&lt;!--  end Military Police when no Military Provost  --&gt;
                             }}
                        }}
                   }}
                   |&lt;!--  no country  --&gt;[[Category:Military provosts{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]}}&lt;!-- end country check --&gt;
                   &lt;!--  end Military Provost  --&gt;
              &lt;!--  Military Police  --&gt;
                  |{{#ifexist: Category:Military police agencies of {{{country}}}&lt;!-- The standard --&gt;
                       |[[Category:Military police agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                       |{{#ifexist: Category:Military police agencies of the {{{country}}}
                            |[[Category:Military police agencies of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                            |{{#ifexist: Category:{{{country}}} military police agencies
                                 |[[Category:{{{country}}} military police agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                 |{{#ifexist: Category:Military police of {{{country}}}
                                      |[[Category:Military police of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                      |{{#ifexist: Category:Military police of the {{{country}}}
                                           |[[Category:Military police of the {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                           |{{#ifexist: Category:{{{country}}} military police
                                                |[[Category:{{{country}}} military police{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
                                                |[[Category:Military police agencies of {{{country}}}{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]&lt;!-- Resort to the standard --&gt;
                                            }}
                                       }}
                                  }}
                             }}
                        }}
                   }}&lt;!--  end Military Police  --&gt;
              }}&lt;!--  end provost parameter  --&gt;}}&lt;!--  end gendarmerie parameter  --&gt;
         }}&lt;!--  end military, provost, and gendarmerie parameters
 
 Legal personality
 --&gt;     {{#switch:{{{legalpersonality}}}
 |government agency|government-owned corporation|government ministry = &lt;!--  do nothing for government agencies  --&gt;
 |&lt;!--  default action for non government agencies  --&gt;[[Category:Non-government law enforcement agencies{{#if: {{{commonname|}}} | {{!}}{{{commonname}}}}}]]
         }}&lt;!--  end Legal personality
 --&gt;}}&lt;!--  end Fictional
 
 --&gt;&lt;/includeonly&gt;&lt;noinclude&gt;&lt;!--
 
 This template uses codified values