Template:Navsource/sandbox
| This is the template sandbox page for Template:Navsource (diff). See also the companion subpage for test cases. |
| This template is used on approximately 5,400 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. |
| This template uses Lua: |
Usage
This template is designed to make an easy external link to a ship's page at Navsource.net
Formal usage
{{navsource|URLcode|Shipname}}where URLcode is extracted from the navsource.net URL (see below) and Shipname is the optional, unformatted name of the ship.
URLcode
To obtain the URLcode parameter value:
- Find the navsource.net url.
- The url for the USS Houston (CL-81) navsource page is
http://www.navsource.net/archives/04/081/04081.htm
- The url for the USS Houston (CL-81) navsource page is
- The URLcode parameter value is that part of the URL between
archives/and.htm- In this example you would use
04/081/04081
- In this example you would use
Shipname
This optional parameter provides the name of the ship in the rendered link. If omitted or left blank, the template uses the current page name in the link. If Shipname parameter is one of the standard forms <prefix> <name> <disambiguator>; <prefix> <name>; or <name> <disambiguator>; or <name> where <name> is part of the article title; then {{navsource}} will apply proper formatting to Shipname.
Error messages
When {{navsource}} cannot figure out how to format Shipname, it will return the Shipname in its original format along with an error message that may help to get the name right. If the name render's as you think it should add the parameter |showerrs=no to disable the error message.
| Template usage | Equivalent wikicode | Final result |
|---|---|---|
{{navsource|04/081/04081|Houston}}
|
[http://www.navsource.net/archives/04/081/04081.htm Photo gallery] of ''Houston'' at NavSource Naval History
|
Photo gallery of Houston at NavSource Naval History no nationality or prefix;[a] |
{{navsource|04/081/04081|Houston (CL-81)}}
|
[http://www.navsource.net/archives/04/081/04081.htm Photo gallery] of ''Houston'' (CL-81) at NavSource Naval History
|
Photo gallery of Houston (CL-81) at NavSource Naval History |
{{navsource|04/081/04081|USS Houston (CL-81)}}
|
[http://www.navsource.net/archives/04/081/04081.htm Photo gallery] of USS ''Houston'' (CL-81) at NavSource Naval History
|
Photo gallery of USS Houston (CL-81) at NavSource Naval History |
{{navsource|04/081/04081|showerrs=no}}
|
[http://www.navsource.net/archives/04/081/04081.htm Photo gallery] of Navsource at NavSource Naval History
|
Photo gallery of Navsource/sandbox at NavSource Naval History[b] |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.