Difference between revisions of "Template:DWT/doc"
Jump to navigation
Jump to search
imported>Trappist the monk (First cut at new documentation following template code upgrade;) |
imported>Trappist the monk m (Copyedit;) |
||
| Line 13: | Line 13: | ||
:'''disp''': controls how the template will render in the page: | :'''disp''': controls how the template will render in the page: | ||
::{{para|disp}} when empty or omitted, displays the abbreviated form: | ::{{para|disp}} when empty or omitted, displays the abbreviated form: | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|disp=}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|disp=}}</nowiki></code> → {{DWT|36,000|metric|disp=}} |
::{{para|disp|long}} creates a verbose description suitable for the first occurrence on a page. Equivalent to the deprecated {{para|first|yes}}; | ::{{para|disp|long}} creates a verbose description suitable for the first occurrence on a page. Equivalent to the deprecated {{para|first|yes}}; | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|disp=long}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|disp=long}}</nowiki></code> → {{DWT|36,000|metric|disp=long}} |
::{{para|disp|adj}} creates the adjectival form: | ::{{para|disp|adj}} creates the adjectival form: | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|disp=adj}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|disp=adj}}</nowiki></code> → {{DWT|36,000|metric|disp=adj}} |
:'''link''': controls when the template output is linked to the [[deadweight tonnage]] article | :'''link''': controls when the template output is linked to the [[deadweight tonnage]] article | ||
::{{para|link}} when empty or omitted, links to the deadweight tonnage article; this is the default; | ::{{para|link}} when empty or omitted, links to the deadweight tonnage article; this is the default; | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|disp=long|link=}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|disp=long|link=}}</nowiki></code> → {{DWT|36,000|metric|disp=long|link=}} |
::{{para|link|off}} instances of the rendered template are not linked to the deadweight tonnage article: | ::{{para|link|off}} instances of the rendered template are not linked to the deadweight tonnage article: | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|disp=long|link=off}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|disp=long|link=off}}</nowiki></code> → {{DWT|36,000|metric|disp=long|link=off}} |
:'''first''': (deprecated) controls how the template will render in the page: | :'''first''': (deprecated) controls how the template will render in the page: | ||
::{{para|first}} (deprecated) when empty or omitted, displays the abbreviated form: | ::{{para|first}} (deprecated) when empty or omitted, displays the abbreviated form: | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|first=}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|first=}}</nowiki></code> → {{DWT|36,000|metric|first=}} |
::{{para|first|yes}} (deprecated) creates a verbose description suitable for the first occurrence on a page. Equivalent to {{para|disp|long}}; | ::{{para|first|yes}} (deprecated) creates a verbose description suitable for the first occurrence on a page. Equivalent to {{para|disp|long}}; | ||
| − | :::<code><nowiki>{{DWT|36,000|metric|first=yes}}</nowiki></code> → {{DWT | + | :::<code><nowiki>{{DWT|36,000|metric|first=yes}}</nowiki></code> → {{DWT|36,000|metric|first=yes}} |
==Examples== | ==Examples== | ||
Revision as of 14:16, 28 September 2013
| 40px | This is a documentation subpage for Template:DWT. It contains usage information, categories and other content that is not part of the original template page. |
Purpose
To show deadweight tonnage, whether expressed in metric or long tons, in a consistent manner. Also to introduce the units used and the intended meaning of the abbreviation DWT the first time it is used in an article.
Usage
{{DWT|number|unit|disp=|link=}}
- Parameters
- number: numerical value of the deadweight tonnage;
- unit: specifies the units in which the dead weight tonnage is measured; use
longormetric; - disp: controls how the template will render in the page:
|disp=when empty or omitted, displays the abbreviated form:{{DWT|36,000|metric|disp=}}→ 36,000 t DWT
|disp=longcreates a verbose description suitable for the first occurrence on a page. Equivalent to the deprecated|first=yes;{{DWT|36,000|metric|disp=long}}→ 36,000 tonnes deadweight (DWT)
|disp=adjcreates the adjectival form:{{DWT|36,000|metric|disp=adj}}→ 36,000-tonne deadweight (DWT)
- link: controls when the template output is linked to the deadweight tonnage article
|link=when empty or omitted, links to the deadweight tonnage article; this is the default;{{DWT|36,000|metric|disp=long|link=}}→ 36,000 tonnes deadweight (DWT)
|link=offinstances of the rendered template are not linked to the deadweight tonnage article:{{DWT|36,000|metric|disp=long|link=off}}→ 36,000 tonnes deadweight (DWT)
- first: (deprecated) controls how the template will render in the page:
Examples
| Input | Displays as |
| {{DWT|36,000|metric|disp=long}} | 36,000 tonnes deadweight (DWT) |
| {{DWT|36,000|long|disp=long}} | 36,000 long tons deadweight (DWT) |
| {{DWT|36,000|metric}} | 36,000 t DWT |
| {{DWT|36,000|long}} | 36,000 LT DWT |
| {{DWT|36,000}} | 36,000 DWT |
- From a page move: This is a redirect from a page that has been moved (renamed). This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name.