Template talk:National Historic Assets of Wales
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||
|
Possible change to expand functions of the template
[edit]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)
- I have added the changes to the sandbox and the test cases appear to work, Unless anyone notices any issues I will update the template when I have put together the documentation to describe how to use these features. EdwardUK (talk) 18:41, 21 October 2021 (UTC)
- Above changes made. In 2022 data for Registered Historic Parks & Gardens should be available from the Cadw website. (link here). If the urls used are similar to other sections of the website it will be possible to expand this template so that it can be used for this register too. EdwardUK (talk) 01:25, 26 October 2021 (UTC)
- Template has been expanded to cover parks and gardens - parameters work the same was as for other types of registered site. EdwardUK (talk) 16:52, 3 October 2022 (UTC)
- Above changes made. In 2022 data for Registered Historic Parks & Gardens should be available from the Cadw website. (link here). If the urls used are similar to other sections of the website it will be possible to expand this template so that it can be used for this register too. EdwardUK (talk) 01:25, 26 October 2021 (UTC)
Ampersand with short citations
[edit]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)
- Pinging @DavidCane and EdwardUK: as a courtesy DankJae 21:34, 13 December 2023 (UTC)
- Thanks for doing that, DankJae. A.D.Hope (talk) 21:36, 13 December 2023 (UTC)
- Using the sfn/harv template has the "&" because it treats it as if two authors had been named. When I did the equivalent Scotland template I did not really look at how it worked I just based it on the original NHLE template, so I am not sure of the best way to change it. One option could be to replace the pipe (|) with a space between {{{author|Cadw}}} and {{{num}}} in the ref= line of code. When using the harv template it would then be written {{harv|Cadw (num) }} , but this would break existing cadw/harv citations, so they would also need to be updated to remove the pipe – I am not sure how many of these there are or how it easy it would be to find them all. I would hope it would be possible to find another solution which would work without causing this difficulty. An option if you just wanted to remove the "&" from an individual harv template is removing the pipe from harv template and adding ref={{harvid|Cadw (num) }} to the citation. EdwardUK (talk) 22:28, 13 December 2023 (UTC)
- I'm not the person to go changing templates, but I appreciate the harvid suggestion to remove the '&' individual citations. Do you think it's worth asking at template:NHLE, since that's effectively the 'master' template? A.D.Hope (talk) 13:47, 15 December 2023 (UTC)
- I have just had a look at that talk page and found something about this issue that I had commented on three years ago but completely forgotten about. There is discussion of a possible solution, using a wrapper template for harv or sfn – but no changes were made at the time, and I am not sure how to actually create this template. It seems like this could be done so that that new citations could be added using this without breaking existing harv citations so it would allow for them to be updated over time. EdwardUK (talk) 17:25, 15 December 2023 (UTC)
- I'm not the person to go changing templates, but I appreciate the harvid suggestion to remove the '&' individual citations. Do you think it's worth asking at template:NHLE, since that's effectively the 'master' template? A.D.Hope (talk) 13:47, 15 December 2023 (UTC)
- Using the sfn/harv template has the "&" because it treats it as if two authors had been named. When I did the equivalent Scotland template I did not really look at how it worked I just based it on the original NHLE template, so I am not sure of the best way to change it. One option could be to replace the pipe (|) with a space between {{{author|Cadw}}} and {{{num}}} in the ref= line of code. When using the harv template it would then be written {{harv|Cadw (num) }} , but this would break existing cadw/harv citations, so they would also need to be updated to remove the pipe – I am not sure how many of these there are or how it easy it would be to find them all. I would hope it would be possible to find another solution which would work without causing this difficulty. An option if you just wanted to remove the "&" from an individual harv template is removing the pipe from harv template and adding ref={{harvid|Cadw (num) }} to the citation. EdwardUK (talk) 22:28, 13 December 2023 (UTC)
- Thanks for doing that, DankJae. A.D.Hope (talk) 21:36, 13 December 2023 (UTC)