![]() | This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Because of the URLs used by the Cadw website this template is currently only able to link to listed buildings. I think it should be possible to make changes to the code and add the parameters needed to expand the compatibility of the template, allowing links to monuments, wrecks, etc. An example would be:
{{National Historic Assets of Wales |num=MM232 |desc=Caerleon Amphitheatre |class=SM |uid=3305}}
which would display as:
There would be two new parameters. The first, for changing the url, would be class=
, which if absent would default to listed building, or if set would enable linking to Registered Historic Landscapes (RHL), Scheduled Monuments (SM), Protected Wrecks (PW) or World Heritage Sites (WHS). The id number at the end of the url (&id=XXXX) for scheduled monuments and world heritage sites does not match their reference number, so for these the second parameter uid=
would be required for linking to the right page on Cadw. This would be instead of placing the url id in the num=
parameter because that would still be used for the ref number being displayed in both the template output and any footnotes that link to it. Also if the website changes this ref number should stay constant making it easier to update or rework the template. Note that it may take some time before I have worked out exactly how to rewrite the template and created the sandbox version to test it.
EdwardUK (
talk)
20:50, 28 September 2021 (UTC)
Would it be possible to remove the ampersand when using this template with the harv or sfn short citation templates? A.D.Hope ( talk) 12:03, 13 December 2023 (UTC)
![]() | This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Because of the URLs used by the Cadw website this template is currently only able to link to listed buildings. I think it should be possible to make changes to the code and add the parameters needed to expand the compatibility of the template, allowing links to monuments, wrecks, etc. An example would be:
{{National Historic Assets of Wales |num=MM232 |desc=Caerleon Amphitheatre |class=SM |uid=3305}}
which would display as:
There would be two new parameters. The first, for changing the url, would be class=
, which if absent would default to listed building, or if set would enable linking to Registered Historic Landscapes (RHL), Scheduled Monuments (SM), Protected Wrecks (PW) or World Heritage Sites (WHS). The id number at the end of the url (&id=XXXX) for scheduled monuments and world heritage sites does not match their reference number, so for these the second parameter uid=
would be required for linking to the right page on Cadw. This would be instead of placing the url id in the num=
parameter because that would still be used for the ref number being displayed in both the template output and any footnotes that link to it. Also if the website changes this ref number should stay constant making it easier to update or rework the template. Note that it may take some time before I have worked out exactly how to rewrite the template and created the sandbox version to test it.
EdwardUK (
talk)
20:50, 28 September 2021 (UTC)
Would it be possible to remove the ampersand when using this template with the harv or sfn short citation templates? A.D.Hope ( talk) 12:03, 13 December 2023 (UTC)