Template:Cite legislation UK/doc: Difference between revisions
fix all the things. doc was a freaking nightmare to figure out from scratch. DOCUMENT YOUR DAMN CODE! |
→See also: this sort of commentary does not belong here; bring it up on the talk page |
||
Line 188: | Line 188: | ||
==See also== |
==See also== |
||
* {{tl|Ukhansard}} |
* {{tl|Ukhansard}} |
||
* {{tl|UK Parliament}} |
* {{tl|UK Parliament}} |
||
* {{tl|UK SI}} |
* {{tl|UK SI}} |
||
* {{tl|ELI}}: Identifier in multiple European countries, but resolves differently in each. |
* {{tl|ELI}}: Identifier in multiple European countries, but resolves differently in each. |
||
Revision as of 14:59, 9 July 2022
![]() | This is a documentation subpage for Template:Cite legislation UK. It may contain usage information, categories and other content that is not part of the original template page. |
Usage
A template to cite UK primary and secondary legislation, as provided by legislation.gov.uk. This is a straightforward wrapper of {{Citation}} (CS2 by default).
To do
- Clean and sanitize. The doc was a nightmare to figure out.
- Eventually move this to a proper CS1|2 module wrapper
- ELI support
Implementation outline
Cite legislation UK: {{Citation |publisher=[[The National Archives (United Kingdom)|The National Archives]] |website=[[legislation.gov.uk]] |id= populated by: |type= "act" (default) or "si" |year= ("1978" or "1948" if omitted) |chapter= (act only, "30" if omitted) |number= (si only, "1" if omitted) |section= |schedule= (set to "0" for a blank after "sch." text) |title= populated by: |type= "act" (default) or "si" |act= (act only, "Interpretation Act 1978" if omitted) |si= (si only, "The Statutory Instruments Regulations 1947" if omitted) |section= |schedule=(set to "0" for a blank after "Sechedule" text) |url= |type=act: https://legislation.gov.uk/ukpga/{year}/{chapter}[/section/{section}]/enacted |type=si: https://legislation.gov.uk/uksi/{year}/{number}[/section/{section}][/schedule/{schedule}]/made |access-date= |date= |mode= |quote= }}
UK Act of Parliament
{{Cite legislation UK |type=act |year= |chapter= |act= |section= |date= |accessdate= }}
The template defaults to the Interpretation Act 1978:
- "Interpretation Act 1978", legislation.gov.uk, The National Archives, 1978 c. 30
UK Statutory Instrument
{{Cite legislation UK |type=si |year= |number= |si= |section= |date= |accessdate= }}
The template defaults to the Statutory Instruments Regulations 1947:
Examples
{{Cite legislation UK | type = si | si = The Equine Identification (England) (Amendment) (EU Exit) Regulations 2018 | year = 2018 | number = 1409 | section = 2 | schedule = 0 | access-date=2022-07-08 | date= These Regulations come into force 21 days after the day on which they are made <!-- | made = 20 December 2018 | laid = 21 December 2018 | force = "These Regulations come into force 21 days after the day on which they are made" --> | quote = test capitalization & punct. }}
"The Equine Identification (England) (Amendment) (EU Exit) Regulations 2018: Section 2: Schedule", legislation.gov.uk, The National Archives, These Regulations come into force 21 days after the day on which they are made, SI 2018/1409 (s. 2)(sch.), retrieved 2022-07-08, test capitalization & punct
{{citation}}
: Check date values in: |date=
(help)
{{Cite legislation UK | year = 2018 | number = 1418 (W. 266) | section = 3 | type = si | si = Gorchymyn Cefnffordd yr A40 a’r Ffordd Gyswllt (Cyffordd Travellers’ Rest, Sir Gaerfyrddin) (Gwahardd Cerbydau a Therfyn Cyflymder 30 MYA Dros Dro) 2018 [The A40 Trunk Road and Link Road (Travellers’ Rest Junction, Carmarthenshire) (Temporary Prohibition of Vehicles and 30 MPH Speed Limit) Order 2018] | date = 3 January 2019 <!-- | made = 21 December 2018 | laid = | force = 3 January 2019 --> <!-- | url = https://www.legislation.gov.uk/wsi/2018/1418/contents/made/welsh --> }}
(W. 266)/section/3/made "Gorchymyn Cefnffordd yr A40 a'r Ffordd Gyswllt (Cyffordd Travellers' Rest, Sir Gaerfyrddin) (Gwahardd Cerbydau a Therfyn Cyflymder 30 MYA Dros Dro) 2018 [The A40 Trunk Road and Link Road (Travellers' Rest Junction, Carmarthenshire) (Temporary Prohibition of Vehicles and 30 MPH Speed Limit) Order 2018]: Section 3", legislation.gov.uk, The National Archives, 3 January 2019, SI 2018/1418 (W. 266) (s. 3) {{citation}}
: Check |url=
value (help)
TemplateData for Cite legislation UK
Parameter | Description | Type | Status | |
---|---|---|---|---|
Type | type | 'act' for Act or 'si' for Statutory Instrument
| Unknown | suggested |
Chapter | chapter | The chapter number of the act
| Number | suggested |
Section | section | The section number, if you would like to cite a particular section | Number | optional |
Name | act | The full name of the Act
| String | suggested |
Number | number | The number of the SI
| Number | suggested |
SI name | si | The full name of the SI
| String | optional |
Access Date | accessdate | The date that legislation.gov.uk was accessed | Date | optional |
year | year | The year of the Act or SI
| Date | optional |
Date | date | The date the act was given Royal Assent or the SI was made
| Date | optional |
Schedule | schedule | The Schedule number, if you would like to cite a specific schedule; for acts with a single schedule, use '0' | Number | optional |
Default value requires type
See also
- {{Ukhansard}}
- {{UK Parliament}}
- {{UK SI}}
- {{ELI}}: Identifier in multiple European countries, but resolves differently in each.