Template:NRHP url/doc: Difference between revisions
m →top: {{High-use}} |
Deleatur yhe (talk | contribs) m 1 revision imported |
(No difference)
| |
Latest revision as of 08:39, 10 September 2026
| This is a documentation subpage for Template:NRHP url. It may contain usage information, categories and other content that is not part of the original template page. |
__EXPECTED_UNCONNECTED_PAGE__
| This template is used on approximately 30,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
The purpose of this template is to provide a single location for the base url that links to the nps.gov website. In the event that the base url is changed at nps.gov, a single change here corrects thousands of broken links.
This template uses {{NRHP url/core}}. When it becomes necessary to change the base url, that change is made at {{NRHP url/core}}.
Usage
This template takes three parameters:
- <syntaxhighlight lang="wikitext" inline style="display: none;" />
|id=– (required) the 'file name' without the .pdf extension - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|title=– (optional) the title of the linked document - <syntaxhighlight lang="wikitext" inline style="display: none;" />
|photos=– (optional) when linking to a file in the Photos folder, setting <syntaxhighlight lang="wikitext" inline style="display: none;" />|photos=ywill modify the url path
Parameter names are not required. When not used, the positional order is:
{{NRHP url|identifier|title|photos}}
When <syntaxhighlight lang="wikitext" inline style="display: none;" />|title= is empty or omitted, the template produces a url suitable for use in Citation Style 1 and Citation Style 2 templates.
{{cite web |title=Central Park Historic District |url={{NRHP url|id=00001069}} |publisher=[[National Park Service]] |access-date=2016-03-03}}- "Central Park Historic District". National Park Service. Retrieved 2016-03-03.
With a title, the template produces a properly marked up external wikilink:
{{NRHP url|id=00001069|title=Central Park Historic District}}- <syntaxhighlight lang="text" class="" style="" inline="1">Central Park Historic District</syntaxhighlight>
To link to the associated photos:
{{NRHP url|id=00001069|title=Central Park Historic District|photos=y}}- <syntaxhighlight lang="text" class="" style="" inline="1">Central Park Historic District</syntaxhighlight>
To create a plain url link to the associated photos:
{{NRHP url|id=00001069|photos=y}}- <syntaxhighlight lang="text" class="" style="" inline="1">https://npgallery.nps.gov/NRHP/GetAsset/NRHP/00001069_photos</syntaxhighlight>
or, when using positional parameters:
{{NRHP url|00001069||y}}- <syntaxhighlight lang="text" class="" style="" inline="1">https://npgallery.nps.gov/NRHP/GetAsset/NRHP/00001069_photos</syntaxhighlight>