Jump to content

Template talk:Cite legislation UK

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
[edit]

Is it possible to link to a schedule, as opposed to a section? If not, could this functionality be added? Hairy Dude (talk) 14:13, 21 August 2019 (UTC)[reply]

@Hairy Dude: Apparently, yes: |schedule=. —[AlanM1(talk)]— 01:12, 3 December 2019 (UTC)[reply]

Translate legislation references like "14 Car 2 c 12"?

[edit]

I don't expect a template like this (designed to formalise legislation citations) to be able to provide this 'on the fly', but maybe someone can suggest a possible mechanism?

On a number of occasions recently, I have found [outside Wikipedia] citations in the style "14 Car 2 c 12" and haven't been able to convert that notation to an 'AAAAAAAA Act yyyy' notation. Does anybody know of a translation service? I know it means something like "Chapter 12 of the 2nd Act of the Reign of Charles II", but that does not advance the search in any significant way. I have in mind something like template:coord does.

(As a test case, 14 Car 2 c 12 should deliver Poor Relief Act 1662). --Red King (talk) 11:11, 17 February 2020 (UTC)[reply]

I don't know of any services that offer that as unfortunately even legislation.gov.uk doesn't hold wholly repealed acts. It might be something possible in Wikidata perhaps needing a new identifier. Nthep (talk) 12:37, 17 February 2020 (UTC)[reply]
I noticed Jnestorius using {{UK-LEG|path=aip/Hen7/10/22|title=Poynings' Law 1495 (c.22)|type=aip}} and it works![1], so it is possible to use the Regnal notation as well as the civil one. So at least some of my wish can be granted without extra work. (That particular 525-year-old act remains at legislation.gov.uk because it continues to apply to Northern Ireland. My test case fails, unfortunately, because it has been repealed.[2] --Red King (talk) 11:22, 25 February 2020 (UTC)[reply]
There is, unfortunately, more recent legislation that uses that notation, e.g. the Aliens Restriction (Amendment) Act 1919 which is 9–10 Geo. 5 c. 92. It surely can't be too hard to add a parameter or two to accommodate this, e.g. in this case citeyear=9–10 Geo. 5 used in the text, leaving year=Geo5/9-10 for the URL. In this case year=1919 works for the URL, but cites the act as 1919 c. 92 which I believe is incorrect. Hairy Dude (talk) 22:13, 2 December 2020 (UTC)[reply]

References

  1. ^ Text of the Poynings' Law 1495 (c.22) as in force today (including any amendments) within the United Kingdom, from legislation.gov.uk.
  2. ^ Text of the Poor Relief Act 1662 (c.12) as in force today (including any amendments) within the United Kingdom, from legislation.gov.uk.

Duplication?

[edit]

Do we now have two templates (this one and template:UK-LEG) doing the same thing? --Red King (talk) 11:22, 25 February 2020 (UTC)[reply]

Template should not have default values

[edit]

Take this example:

{{Cite legislation UK|type=act|chapter=14|act=Short Titles Act 1896|date=20 September 1896|year=1896| accessdate=6 November 2020}}

which produces

"Short Titles Act 1896", legislation.gov.uk, The National Archives, 20 September 1896, 1896 c. 14, retrieved 6 November 2020

exactly as it described. But suppose the editor thinks "do we really need 1896 three times?" and decides to just drop the "|year=", thus:

{{Cite legislation UK|type=act|chapter=14|act=Short Titles Act 1896|date=20 September 1896| accessdate=6 November 2020}}

which produces

"Short Titles Act 1896", legislation.gov.uk, The National Archives, 20 September 1896, 1978 c. 14, retrieved 6 November 2020

exactly as it should not. Instead of the year being omitted, we get "1978" and worse still, the legislation fetched is "Housing (Financial Provisions) (Scotland) Act 1978" (because that is the Act at 1978 c14).

I know the workaround is to include a null value "year=" argument thus:

{{Cite legislation UK|type=act|chapter=14|act=Short Titles Act 1896|date=20 September 1896|year=| accessdate=6 November 2020}}

which produces

"Short Titles Act 1896", legislation.gov.uk, The National Archives, 20 September 1896, c. 14, retrieved 6 November 2020

which does have the desired result.

In the case where a new editor asked for my help, they had written "|Year=1896" and been totally flummoxed by getting some random modern legislation.

Clearly, "year" is a mandatory element, so its omission should generate an error message and not some lazy default substitution. Is there any convincing reason for the template to have any defaults? --John Maynard Friedman (talk) 11:26, 8 November 2020 (UTC)[reply]

Agreed. There is no good rationale for defaulting to the Interpretation Act. It's almost as if {{Cite book}} defaulted to the Oxford English Dictionary – there is no reason to use it that way. More generally, I think it would be better to replace this and similar templates such as {{Cite legislation Scotland}} with a Lua module that can more elegantly handle stuff like this. It could also handle regnal year citation such as translating "Geo5/9-10" (the URL fragment used by legislation.gov.uk) into "9–10 Geo. 5" for the text. That would also produce error messages if any required parameters such as year are missing. Hairy Dude (talk) 22:22, 2 December 2020 (UTC)[reply]

Mode

[edit]

Could a |mode= parameter be added to allow switching to appropriate CS1 or CS2 style output so this can be matched to other cites in an article. Keith D (talk) 12:16, 14 July 2021 (UTC)[reply]

"regulation", "article" or "rule" instead of "section" for statutory instruments

[edit]

Currently you can cite a "section" of an enactment. However, statutory instruments don't have sections. The equivalent for Regulations, Orders and Rules are 'regulations', 'articles' and 'rules' respectively. Since legislation.gov.uk uses the same URL scheme for all of these, it's not possible to auto-detect which should be used - but we should be able to use something besides the incorrect "section". Hairy Dude (talk) 06:23, 9 January 2022 (UTC)[reply]

[edit]
This section and the next one, #Links are 404, refer to the same issue
Possible solution for this suggested in next section, #Links are 404. Pol098 (talk) 14:12, 28 December 2022 (UTC)[reply]

The template can link to a numbered section; is it possible for it to link to the Introduction? A link to a section is generated by the template, for example:

{{Cite legislation UK |type=act|chapter=13|act=Parliament Act 1911|year=|section=1}}

which links to:

https://www.legislation.gov.uk/ukpga/Geo5/1-2/13/section/1/enacted

The URL of the introduction is like

https://www.legislation.gov.uk/ukpga/Geo5/1-2/13/introduction

but as far as I know the template can't generate it (as of today).

Similarly, is it possible to link to the whole act? URL is like

https://www.legislation.gov.uk/ukpga/Geo5/1-2/13

Best wishes, Pol098 (talk) 15:09, 11 December 2022 (UTC)[reply]

[edit]
This section and the previous one, #How_to_link_to_Introduction,_and_to_whole_act?, refer to the same issue

This template is used at Bail in the United Kingdom where it generates links that are 404. {{cite legislation UK |type=act |year=1984 |chapter=60 |act=Police and Criminal Evidence Act 1984 |section=47ZE}} is one example of this usage, but as far as I can tell all of the invocations of this template at that page to generate a reference end up linking to a "page not found" error. -- Mikeblas (talk) 15:52, 26 December 2022 (UTC)[reply]

For information: the (404) link generated by the template for the example given is (still the case Feb 23)
https://www.legislation.gov.uk/ukpga/1984/60/section/47ZE/enacted

The correct link needed is
https://www.legislation.gov.uk/ukpga/1984/60/section/47ZE

I have corrected this particular error in Bail in the United Kingdom by not using a template, but others remain.
Best wishes, Pol098 (talk) 15:05, 27 December 2022 (UTC)[reply]
It looks like when a link to a section of an act is required the switch act=enacted doesn't need to be there. I think this switch is only needed if the link desired is to the whole act as it was enacted Nthep (talk) 12:52, 28 December 2022 (UTC)[reply]
Taking this section and the previous one, #How to link to Introduction, and to whole act? together, we have several URL formats that may need to be generated:
https://www.legislation.gov.uk/ukpga/1984/60
https://www.legislation.gov.uk/ukpga/1984/60/introduction
https://www.legislation.gov.uk/ukpga/1984/60/section/47ZE/enacted
https://www.legislation.gov.uk/ukpga/1984/60/section/47ZE

and possibly others.
[Added 22 Aug24: #Local acts like
https://www.legislation.gov.uk/ukla/Will4/4-5/75/contents/enacted could also be added.]

I don't know if it's worth doing—amongst other things it will require the user to know what the URL should be—but an additional template parameter called perhaps url-type with values whole-act, introduction, enacted-section (default) and non-enacted-section would add flexibility. Maybe even a value custom-url with an additional parameter |alt-url=, where any text could be appended to the URL of the whole act: |url-type=custom-url|alt-url="/section/47ZE". Best wishes, Pol098 (talk) 14:07, 28 December 2022 (UTC)[reply]

More of a note-to-self than anything else, but...

[edit]

How to translate from a link to an Act to the citation template:

Example Act link: www.legislation.gov.uk/ukpga/2006/38/section/55

{{Cite legislation UK | type = act | act = [copy name from the page in question] | year = 2006 [after '/ukpga/' in the URL] | chapter = 38 [after the year in the URL] | section = 55 [right at the end of the URL] | date = [at the bottom of the page under "Commencement Information"]}}

We don't need to ask any more than that and for a lot of people it's easier to work backwards from the URL than try to work forwards from the weird UKPGA data. — Trey Maturin 20:38, 28 August 2023 (UTC)[reply]

Local acts

[edit]

The Hammersmith Parish Act 1834 is a local act of parliament: https://www.legislation.gov.uk/ukla/Will4/4-5/75/contents/enacted

Currently, this template doesn't support these acts. Hughbellamy (talk) 17:40, 20 August 2024 (UTC)[reply]

This point is perhaps related to #How to link to Introduction, and to whole act?, and #Links are 404, above, long-unresolved issues. Best wishes, Pol098 (talk) 20:42, 22 August 2024 (UTC)[reply]