الگو:Navsource
این الگو از لوآ استفاده میکند: |
استفاده
[ویرایش]این الگو برای ایجاد پیوند بیرونی به صفحه یک کشتی در Navsource.com ساختهشده است
Formal usage
[ویرایش]{{navsource|URLcode|Shipname}}
where URLcode is extracted from the navsource.com URL (see below) and Shipname is the optional, unformatted name of the ship.
URLcode
[ویرایش]To obtain the URLcode parameter value:
- Find the navsource.com url.
- The url for the یوا Houston (CL-81) navsource page is
http://www.navsource.org/archives/04/081/04081.htm
- The url for the یوا 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.org/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;[الف] |
{{navsource|04/081/04081|Houston (CL-81)}}
|
[http://www.navsource.org/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.org/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.org/archives/04/081/04081.htm Photo gallery] of Navsource at NavSource Naval History
|
Photo gallery of Navsource at NavSource Naval History[ب] |