Template:Legislation link: Difference between revisions

From FOIwiki
Jump to navigationJump to search
(RPnAxTBopArBP)
m (Reverted edits by 46.21.168.170 (talk) to last revision by Bjh21)
 
Line 1: Line 1:
IMHO you've got the right asnewr!
<noinclude>
This template is used to make a reference to a piece of legislation.  It is called internally by templates like [[Template:uksi]], [[Template:ukpga]], etc.
 
<!--
There's a nasty hack here.  To pass {{{4}}} to the layout template, we have to arrange for it to be returned by the query.  That's done by asking whether the page is in an empty category and returning {{{4}}} if it is not.
-->
</noinclude>{{#ask:[[Legislation ID::{{{1}}}/{{{2}}}/{{{3}}}]]
|?category:void#,{{{4|}}}|default={{#if:{{{4|}}}|{{{4}}}|{{ {{{1}}} fallback|{{{2}}}|{{{3}}}}} }}<sup>({{#formlink:form=Legislation|link text=add|query string=Legislation[Type]={{{1}}}&Legislation[Year]={{{2}}}&Legislation[Number]={{{3}}}}})</sup>
|link=none|format=template|template={{{1}}} format}}

Latest revision as of 21:03, 21 July 2011

This template is used to make a reference to a piece of legislation. It is called internally by templates like Template:uksi, Template:ukpga, etc.

{{ {{{1}}} fallback|{{{2}}}|{{{3}}}}}({{#formlink:form=Legislation|link text=add|query string=Legislation[Type]={{{1}}}&Legislation[Year]={{{2}}}&Legislation[Number]={{{3}}}}})