Template:National Historic Assets of Wales/doc

This template is used to provide a link to the Cadw — National Historic Assets of Wales (NHAW) database  for a designated historic asset or site in Wales.

The database contains the following designated historic assets or sites in Wales:
 * Listed buildings
 * Protected wrecks (PW)
 * Registered historic landscapes (RHL)
 * Scheduled monuments (SM)
 * World Heritage Sites (WHS)

The database records all those in Wales, and is updated as changes to entries are made, and new listings are added. the database contains : Listed buildings (around 30,000), Protected wrecks (6), Registered historic landscapes (58), Scheduled monuments (around 4200) and World Heritage Sites (12).

Usage

 * : for Listed Buildings
 * : for Protected Wrecks
 * : for Registered Heritage Landscapes, Scheduled Monuments and World Heritage Sites

Required parameter for all types

 * num: the 'list entry number' from the database.

Required parameters for historic assets other than listed buildings

 * class: to adjust the URL based on the type of asset. Do not use for listed buildings. Accepted values are:
 * PW = Protected wreck
 * RHL = Registered historic landscape
 * SM = Scheduled monument
 * WHS = World Heritage site
 * uid: The id extracted from the URL, for example: http://cadwpublic-api.azurewebsites.net/reports/historiclandscape/FullReport?lang=en&id= HLW%20(Gw)%205. For registered historic landscapes, scheduled monuments and World Heritage sites this is different from the 'num', which is also a required. Do not use for protected wrecks or listed buildings.

Optional parameters
Additional information for the title:
 * desc: additional text description such as the name of the building or site; useful if there are several listed objects in an article. If this parameter is not used, default text 'Details from online database' will be displayed instead.
 * grade: to display the Grade of a listed building; enter as II, II* or I. Only appears if desc is also used. Only use for listed buildings
 * author: defaults to Cadw, but can be changed to another name if desired
 * author-link: defaults to Cadw, but is not set by default if author is set to something other than Cadw
 * date: the date provided by Cadw; can be a full or partial date
 * year: the year provided by Cadw; use of date is recommended, see Template:Cite web/doc for proper usage
 * orig-year: the year information was first provided by Cadw; only appears if date or year is also used
 * access-date: the date a Wikipedia editor retrieved information from the Cadw list database.
 * mode: defaults to cs1; set to cs2 to provide consistency with citation style 2, as produced by
 * postscript: controls the closing punctuation for the citation; defaults to a period ; for no terminating punctuation, set to none, however using cs2 does this automatically
 * fewer-links: use yes to remove repeated wikilinks where the template is used more than once in an article
 * ref: defaults to author (Cadw) and the National Historic Assets of Wales number, but can be reset to any value
 * short: use yes with num to produce an external link with just the list number shown; yes suppresses the display of other parameters.

All Cite web parameters are available.

Examples
displays as:

displays as:

displays as:

displays as:

displays as:

If a short citation is required (not to be confused with short) and one of the harv templates or sfn is used then  will link the short reference to the long one. For example,  produces  that links to the 'Cardiff Bridge' example above. This is different from the standard use of the that links using the parameters 'author' and 'date' or 'year'.

Some articles may have multiple entries. yes can be used to remove the repeated internal wikilinks from any additional and subsequent instances of the template:

displays as:

Examples for historic assets other than listed buildings
displays as:

displays as:

displays as:

displays as:

Template data
{	"description": "Provides an external link to an entry on Cadw's National Historic Assets of Wales (NHAW) database of heritage assets", "params": { "num": { "label": "num", "description": "the 'list entry number' from the database", "required": true, "type": "number" },		"desc": { "label": "desc", "description": "Additional text description, such as the name of the building or site. Useful if there are several listed objects in an article.  If this parameter is not used, default text 'Details from listed building database' will be displayed instead.", "required": false, "suggested": true, "default": "Details from online database", "type": "string" },		"class": { "label": "class", "description": "to change the URL based on type of historic asset if not a listed building: enter as 'PW', 'RHL', 'SM' or 'WHS'", "required": false, "type": "string" },		"uid": { "label": "uid", "description": "the id extracted from the URL, required for registered heritage landscapes, scheduled monuments and world heritage sites", "required": false, "type": "string" },		"grade": { "label": "grade", "description": "to display the Grade of a listed building: enter as 'II', 'II*' or 'I', only appears if desc is also used", "required": false, "type": "string" },		"author": { "label": "author", "description": "defaults to 'Cadw', but can be changed to another name if desired", "required": false, "default": "Cadw", "type": "string" },		"author-link": { "label": "author-link", "description": "defaults to 'Cadw', but is not set by default if author is set to something other than Cadw", "required": false, "default": "Cadw", "type": "string" },		"date": { "label": "date", "description": "the date provided by Cadw; can be a full or partial date", "required": false, "type": "string" },		"year": { "label": "year", "description": "the year provided by Cadw; use of date parameter is recommended", "required": false, "type": "string" },		"orig-year": { "label": "orig-year", "description": "the year information was first provided by Cadw; only appears if date or year parameter is also used", "required": false, "aliases": ["origyear"], "type": "string" },		"access-date": { "label": "access-date", "description": "the date a Wikipedia editor retrieved and/or verified information from the Cadw list database", "required": false, "suggested": true, "aliases": ["accessdate"], "autovalue": " ", "type": "string" },		"mode": { "label": "mode", "description": "defaults to 'cs1'; set to 'cs2' to provide consistency with Citation style 2, as produced by ", "required": false, "type": "string" },		"postscript": { "label": "postscript", "description": "controls the closing punctuation for the citation; defaults to a period (.); for no terminating punctuation set to none, however using mode=cs2 does this automatically", "required": false, "type": "string" },		"fewer-links": { "label": "fewer-links", "description": "set to 'yes' to remove repeated wikilinks to 'Cadw' and 'National Historic Assets of Wales', where the template is used more than once in an article", "required": false, "type": "string" },		"ref": { "label": "ref", "description": "defaults to author and the Cadw list number, but can be set to any value", "required": false, "type": "string" },		"short": { "label": "short", "description": "use 'yes' with just the num parameter to produce an external link with just the list number shown; suppresses the display of other parameters", "required": false, "type": "string" }	} }

Tracking categories

 * This tracks pages which have an empty num field.
 * This tracks pages which have an empty num field.