Difference between revisions of "Template:Hansard/doc"

From blackwiki
Jump to navigation Jump to search
imported>Bungle
(provide some documentation)
 
imported>Bungle
(update documentation)
 
Line 4: Line 4:
  
 
==Usage==
 
==Usage==
  <nowiki>{{Hansard|URL|House (optional)|Accessed}}</nowiki>
+
  <nowiki>{{Hansard|URL|Title (optional)|House (optional)|Access-date (optional)}}</nowiki>
  
 
This template is used for auto generating a citation when using Historic Hansard (UK Parliament) as a reference. It will determine the date from the url and generate a title from the url (both of which are stored in the url). Only part of the url needs to be entered into the parameter (from the year onwards).
 
This template is used for auto generating a citation when using Historic Hansard (UK Parliament) as a reference. It will determine the date from the url and generate a title from the url (both of which are stored in the url). Only part of the url needs to be entered into the parameter (from the year onwards).
  
 
===Parameters===
 
===Parameters===
* {{para|URL|address}}, <strong>mandatory</strong>, defines the url portion from the year onwards
+
* {{para|URL|address}}, <strong>mandatory</strong>, defines the url portion from the year onwards (can also be specified as first parameter without the url=)
* {{para|house|NAME}}, <strong>optional</strong>, defines whether it relates to commons, lord or written-answers (default commons)
+
* {{para|title|TITLE}}, <strong>optional</strong>, specifies a manual title (default title is taken from the url)
* {{para|accessed|DATE}}, <strong>mandatory</strong>, defines a manually entered ''date'' for the access-date value
+
* {{para|house|NAME}}, <strong>optional</strong>, defines whether it relates to commons, lords or written (default commons)
 +
* {{para|accessdate|DATE}}, <strong>optional</strong>, defines the access-date (also works as "accessed" and "access-date")
  
 
==Example==
 
==Example==
 
If the url is https://api.parliament.uk/historic-hansard/commons/1914/aug/07/royal-assent, only the part from "1914" should be entered. For example,
 
If the url is https://api.parliament.uk/historic-hansard/commons/1914/aug/07/royal-assent, only the part from "1914" should be entered. For example,
   <nowiki>{{Hansard|url=1914/aug/07/royal-assent |accessed=1 January 2010}}</nowiki>
+
   <nowiki>{{Hansard|url=1914/aug/07/royal-assent |access-date=1 January 2010}}</nowiki>

Latest revision as of 13:40, 28 April 2020

Usage

{{Hansard|URL|Title (optional)|House (optional)|Access-date (optional)}}

This template is used for auto generating a citation when using Historic Hansard (UK Parliament) as a reference. It will determine the date from the url and generate a title from the url (both of which are stored in the url). Only part of the url needs to be entered into the parameter (from the year onwards).

Parameters

  • |URL=address, mandatory, defines the url portion from the year onwards (can also be specified as first parameter without the url=)
  • |title=TITLE, optional, specifies a manual title (default title is taken from the url)
  • |house=NAME, optional, defines whether it relates to commons, lords or written (default commons)
  • |accessdate=DATE, optional, defines the access-date (also works as "accessed" and "access-date")

Example

If the url is https://api.parliament.uk/historic-hansard/commons/1914/aug/07/royal-assent, only the part from "1914" should be entered. For example,

 {{Hansard|url=1914/aug/07/royal-assent |access-date=1 January 2010}}