Template:United States presidential election results table header/doc
This is a documentation subpage for Template:United States presidential election results table header. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 3,400 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template should not be substituted. |
This is used to start the table of the results of United States presidential elections in a given area, such as a county, city, etc. It is used alongside {{PresRow}} and {{PresFoot}} for that purpose, like so:
{{PresHead|PresHead parameters...}}
{{PresRow|PresRow parameters...}}
{{PresRow|PresRow parameters...}}
.
.
.
{{PresRow|PresRow parameters...}}
{{PresFoot|PresFoot parameters...}}
It has the following parameters:
whig
- If set toyes
, will change the GOP header to read "Republican / Whig".place
- Gives the name of the place.source, source1, source2, source3, and source4
- For sources. Ref tags, if used, will need to be defined within these parameters. Please do not try to place inline refs in the table itself, as the code does not allow for that.collapsed
- If set totrue
, the table will be collapsed by default. Do not do this unless absolutely necessary, as auto-collapsed tables hinder accessibility and do not work on the mobile site.
Test cases can be found at the test page for PresRow here.
Aliases
editSubstitution
editPresHead (this particular template) and PresFoot should NOT be substituted. The code works just the same if they are, but it is not best practice to substitute them. PresHead should not be substituted because it doesn't speed up the performance of the page appreciably and leaves it unable to automatically conform to any changes to the template (however low a chance they may have of happening). PresFoot should not be substituted because it won't necessarily be the earliest Presidential election available (earlier data may yet be found, for example), and it leaves a "cap" to the wikitable that proves a slight inconvenience to remove.
PresRow may be substituted at the discretion of the editor to help avoid the transclusor (i.e., the page on which the template is transcluded) reaching the template limits.