Template:Legislation: Difference between revisions

From FOIwiki
Jump to navigationJump to search
Disable original text link for old Acts
anaw support
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This is the "Legislation" template.  It's intended to be put in a page describing a piece of legislation.
This is the "Legislation" template.  It's intended to be put in a page describing a piece of legislation.
It puts the page in one of the categories under [[:Category:Legislation]].
It should be called in the following format:
It should be called in the following format:
<pre>
<pre>
{{Legislation
{{Legislation
|Type=ukpga|uksi|...
|Type=ukpga|uksi|wsi|...
|Year=
|Year=
|Number=
|Number=
Line 12: Line 13:
</pre>
</pre>


</noinclude>* [[Property:Short title|Short title]]: [[Short title::{{{Short title|}}}]]
</noinclude>* To link to this legislation, try <code><nowiki>{{</nowiki>{{{Type}}}<nowiki>|</nowiki>{{{Year}}}<nowiki>|</nowiki>{{{Number}}}<nowiki>}}</nowiki></code>.
{{#if:{{{Type|}}}
* [[Property:Short title|Short title]]: [[Short title::{{{Short title|}}}]]
|* [[Property:Legislation ID|Legislation ID]]: [[Legislation ID::{{{Type}}}/{{{Year}}}/{{{Number}}}]]
* [[Property:Legislation ID|Legislation ID]]: [[Legislation ID::{{{Type}}}/{{{Year}}}/{{{Number}}}]] [[Legislation type::{{{Type}}}| ]] [[Legislation year::{{{Year}}}| ]] [[Legislation number::{{{Number}}}| ]]
{{#switch:{{#expr:{{{Year}}} >= 1988}}
{{#switch:{{{Type}}}
|1=* [http://www.opsi.gov.uk/acts/acts{{{Year}}}/{{{Type}}}_{{{Year}}}{{padleft:{{{Number}}}|4}}_en_1 Original text on OPSI site]
  <!-- Welsh and Northern Ireland SIs are UK SIs too. -->
}}* [http://www.opsi.gov.uk/RevisedStatutes/Acts/ukpga/{{{Year}}}/cukpga_{{{Year}}}{{padleft:{{{Number}}}|4}}_en_1 Revised text on OPSI site]
  |wsi|nisi = * [[Property:Legislation ID|Legislation ID]]: [[Legislation ID::uksi/{{{Year}}}/{{{Number}}}]] [[Legislation type::uksi| ]]
}}{{#if:{{{Legislation ID|}}}|* [[Property:Legislation ID|Legislation ID]]: [[Legislation ID::{{{Legislation ID|}}}]]
}}{{#switch:{{{Type}}}
  |ukpga|asp|nisi|nia|apni|mwa|anaw = {{legislation.gov.uk revised|{{{Type}}}/{{{Year}}}/{{{Number}}}}}
  |ukla = {{#iferror:{{#ifexpr:{{{Year}}} >= 1991|{{legislation.gov.uk revised|{{{Type}}}/{{{Year}}}/{{{Number}}}}}
}}}}|uksi|wsi|ssi = {{#ifexpr:{{{Year}}} >= 1987|{{legislation.gov.uk original|{{{Type}}}/{{{Year}}}/{{{Number}}}}}
}} |nisr = {{#ifexpr:{{{Year}}} >= 1996|{{legislation.gov.uk original|{{{Type}}}/{{{Year}}}/{{{Number}}}}}}}  
}}{{#if:{{{SLD number|}}}|* {{SLD number|{{{SLD number|}}}}}
}}{{#if:{{{SLD number|}}}|* {{SLD number|{{{SLD number|}}}}}
}}<includeonly>{{#switch:{{{Type}}}
}}<includeonly>{{#switch:{{{Type}}}
|ukpga=[[Category:Public General Acts of the UK Parliament]]
|ukpga=[[Category:Public General Acts of the UK Parliament]]
|ukla=[[Category:Local Acts of the UK Parliament]]
|ukla=[[Category:Local Acts of the UK Parliament]]
|asp=[[Category:Acts of the Scottish Parliament]]
|nisi=[[Category:Northern Ireland Orders in Council]]
|nia=[[Category:Acts of the Northern Ireland Assembly]]
|mwa=[[Category:Measures of the National Assembly for Wales]]
|uksi=[[Category:UK Statutory Instruments]]
|uksi=[[Category:UK Statutory Instruments]]
|ssi=[[Category:Scottish Statutory Instruments]]
|ssi=[[Category:Scottish Statutory Instruments]]
|wsi=[[Category:Welsh Statutory Instruments]]
|nisr=[[Category:Northern Ireland Statutory Rules]]
|apni=[[Category:Acts of the Northern Ireland Parliament (1921-1972)]]
|anaw=[[Category:Acts of the National Assembly for Wales]]
|#default=[[Category:Legislation]]}}</includeonly>
|#default=[[Category:Legislation]]}}</includeonly>

Latest revision as of 20:02, 4 May 2013

This is the "Legislation" template. It's intended to be put in a page describing a piece of legislation. It puts the page in one of the categories under Category:Legislation. It should be called in the following format:

{{Legislation
|Type=ukpga|uksi|wsi|...
|Year=
|Number=
|Short title=
|SLD number=
}}
  • To link to this legislation, try {{{{{Type}}}|{{{Year}}}|{{{Number}}}}}.
  • Short title:
  • Legislation ID: {{{Type}}}/{{{Year}}}/{{{Number}}}