قالب:NVR url

Template documentation[view] [edit] [history] [purge]

The purpose of this template is to have a single location for the Naval Vessel Register (NVR) ship detail base url as a method of combating link rot. Most links to the NVR website from Wikipedia are to individual ship detail pages where the url looks something like:

http://www.nvr.navy.mil/SHIPDETAILS/SHIPSDETAIL_<hull number>.HTML

Prior to September, 2016 the urls looked something like:

http://www.nvr.navy.mil/NVRSHIPS/DETAILS/<hull number>.HTM

Usage

The template takes two parameters:

|id= – (required) the <hull number> section of the 'file name' portion of the url path (typically the ship's hull designation, see above) without the .HTML or .HTM extension
|title= – (optional) a title or label for an external link

Parameter names are not required. When not used, the positional order is:

{{NVR url|identifier|title}}

When |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=USS Zumwalt |website=Naval Vessel Register |url={{NVR url|DDG_1000}} |accessdate=1 October 2016}}
"USS Zumwalt". Naval Vessel Register. Retrieved 1 October 2016.

With a title, the template produces a properly marked up external wikilink:

{{NVR url|DDG_1000|USS ''Zumwalt''}}
[http://www.nvr.navy.mil/SHIPDETAILS/SHIPSDETAIL_DDG_1000.HTML USS ''Zumwalt'']
USS Zumwalt

The template supports older id's that were formerly used by the older style links. For example, for the id 'OLDIRON' which used to link to http://www.nvr.navy.mil/NVRSHIPS/DETAILS/OLDIRON.HTM the template produces an updated link :

{{NVR url|OLDIRON|USS ''Constitution''}}
[http://www.nvr.navy.mil/SHIPDETAILS/SHIPSDETAIL_1315.HTML USS ''Constitution'']
USS Constitution

See also