Template:MHT url

From HandWiki
Revision as of 12:20, 9 October 2017 by imported>MusikAnimal (Protected "Template:MHT url": Highly visible template; 1,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite)))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation[view] [edit] [history] [purge]

The purpose of this template is to have a single location for the Maryland Historical Trust base url as a method of combating link rot.

Usage

The template takes two parameters:

|id= – (required) the value assigned to the query HDID or NRID in the source's url
|title= – (optional) the title of the linked document

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

{{MHT 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=Washington Monument |url={{MHT url|id=107}} |website=[[Maryland Historical Trust]] |access-date=2016-03-11}}
"Washington Monument". http://mht.maryland.gov/nr/NRDetail.aspx?NRID=107. 

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

{{MHT url|id=107|title=Washington Monument}}
[http://mht.maryland.gov/nr/NRDetail.aspx?NRID=107 Washington Monument]
Washington Monument