Difference between revisions of "Template:Category U.S. State elections by year"

From blackwiki
Jump to navigation Jump to search
imported>Number 57
m (Reverted edits by Number 57 (talk) to last version by Matt Fitzpatrick)
imported>Number 57
(Update for new category name format (bot moving them as I write))
Line 1: Line 1:
<includeonly>{{Category U.S. State elections by year/core
+
<includeonly>{{Category U.S. State elections by year/core/sandbox
| place = {{{place|{{Str left|{{BASEPAGENAME}}|{{#expr:{{Str find|{{BASEPAGENAME}}|elections}}-1}}}}}}}
+
| place = {{{place|{{str sub new|{{BASEPAGENAME}}|5|-10}}}}}
| year = {{{year|{{Str rightc|{{PAGENAME}}|4}}}}}
+
| year = {{{year|{{Str left|{{PAGENAME}}|4}}}}}
 
| nocategories = {{{nocategories|}}}
 
| nocategories = {{{nocategories|}}}
 
<!--
 
<!--

Revision as of 10:09, 13 December 2018

Template documentation[view] [edit] [history] [purge]

This template is used as a category header for election by year categories for state elections in the United States.

e.g.

Usage

Just use: {{Category U.S. State elections by year}}

Both the place and the year are derived automatically, from the category name.

To override place and year, use |place=(place) and |year=(year).

Automatic categorization

The template automatically adds the transcluding page to the following categories:

  • [[Category:YEAR elections in the United States by state]], with a sort key of PLACE
  • [[Category:PLACE elections by year]], with a sort key of YEAR
  • [[Category:YEAR in PLACE]], with a sort key of "Elections"

To suppress categorization, use |nocategories=y.