Difference between revisions of "Template:CodeFedReg/doc"

From blackwiki
Jump to navigation Jump to search
imported>John P. Sadowski (NIOSH)
(tweak)
imported>John P. Sadowski (NIOSH)
Line 52: Line 52:
 
     "1": {
 
     "1": {
 
       "label": "Title",
 
       "label": "Title",
       "description": "Title of the CFR",
+
       "description": "Title within the CFR",
 
       "type": "number",
 
       "type": "number",
 
       "required": true
 
       "required": true
Line 58: Line 58:
 
     "2": {
 
     "2": {
 
       "label": "Part",
 
       "label": "Part",
       "description": "Part of the CFR",
+
       "description": "Part of within CFR",
 
       "type": "number",
 
       "type": "number",
 
       "required": false,
 
       "required": false,
Line 65: Line 65:
 
     "subpart": {
 
     "subpart": {
 
       "label": "Subpart",
 
       "label": "Subpart",
       "description": "Subpart of the CFR (unusual)",
+
       "description": "Subpart within the CFR (unusual)",
 
       "type": "string",
 
       "type": "string",
 
       "required": false
 
       "required": false
Line 71: Line 71:
 
     "prefix": {
 
     "prefix": {
 
       "label": "Section prefix",
 
       "label": "Section prefix",
       "description": "Prefix for section of the CFR (unusual)",
+
       "description": "Prefix for section within the CFR (unusual)",
 
       "type": "string",
 
       "type": "string",
 
       "required": false
 
       "required": false
Line 77: Line 77:
 
     "3": {
 
     "3": {
 
       "label": "Section",
 
       "label": "Section",
       "description": "Section of the CFR",
+
       "description": "Section within the CFR",
 
       "type": "string",
 
       "type": "string",
 
       "required": false,
 
       "required": false,
Line 84: Line 84:
 
     "4": {
 
     "4": {
 
       "label": "Clause",
 
       "label": "Clause",
       "description": "Clause of the CFR",
+
       "description": "Clause within the CFR",
 
       "type": "string",
 
       "type": "string",
 
       "required": false,
 
       "required": false,

Revision as of 23:49, 25 April 2017

Usage

This template cites the Code of Federal Regulations with automatic links. It wikilinks the title and/or part if it exists on Wikipedia, and makes an external link to the U.S. government's GPO Access site for the subpart and section.

This template links to external sites. External links should not normally be used in the body of an article; see Wikipedia:External links for discussion of acceptable and unacceptable uses.

Normal citations — 1 C.F.R. 2.3a

{{CodeFedReg | 1 | 2 | 3 | a}}

  • 1 = Title
  • 2 = Part
  • 3 = Section
  • a = Clause (optional)
Subpart citations — 1 C.F.R. 2 Subpart B

{{CodeFedReg | 1 | 2 | subpart=B }}

  • 1 = Title
  • 2 = Part
  • subpart=B = Subpart
Strange prefixed/appendix section citations — 1 C.F.R. 2 Examp 3

{{CodeFedReg | 1 | 2 | prefix=Examp | 3 }}

  • 1 = Title
  • 2 = Part
  • prefix=Examp = Prefix abbreviation (as used on GPO Access citations; often prefix=App for Appendix)
  • 3 = Section (optional; sometimes a letter for some prefixes)
  • a = Clause (optional)
Optional combined subpart/section citations — 1 C.F.R. 2 Subpart B §3a

{{CodeFedReg | 1 | 2 | subpart=B | 3 | a}}

  • 1 = Title
  • 2 = Part
  • subpart=B = Subpart
  • 3 = Section (optional)
  • a = Clause (optional)

If both subpart and section are given, both are displayed, but the link is to the section, since it is more specific.

Optional parameters
  • year=2000 = year to use instead of current; GPO Access has copies of regulations several years back
  • accessdate=Template:Today (mdy) = adds "accessed on" language for citations

prefix, subpart, year, and accessdate are new as of October 22, 2010.

For more examples and results, see Template:CodeFedReg/testcases.

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for CodeFedReg

This template generates a link to a section of the U.S. Code of Federal Regulations (CFR)

Template parameters

ParameterDescriptionTypeStatus
Title1

Title within the CFR

Numberrequired
Part2

Part of within CFR

Numbersuggested
Subpartsubpart

Subpart within the CFR (unusual)

Stringoptional
Section prefixprefix

Prefix for section within the CFR (unusual)

Stringoptional
Section3

Section within the CFR

Stringsuggested
Clause4

Clause within the CFR

Stringsuggested
Yearyear

Year, only if not current year

Dateoptional
Access dateaccessdate

Date accessed, for use in citations

Dateoptional

Template:United States legal citation templates