Templat:N/a
N/A |
The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background. They are commonly used in comparison tables.
For example, {{yes}}
makes a cell with a green background. The text in the cell is taken from the first parameter; {{yes|Sure}}
would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: {{table cell template}} text
or {{table cell template}} | text
. This information, the colors and default texts are found in the table below.
If you want to use other attributes for the table cells, e.g. colspan
or rowspan
, they need to be put before the template call and there must be no vertical bar |
in between them:
Yes | No | N/A |
---|---|---|
colspan=2 Templat:Yes-No |
... !{{Yes}} ||{{No}} ||rowspan=2 {{n/a}} |- |colspan=2 {{Yes-No}} ...
Templates in this seriesSunting
Class[1] | Default syntax | Preview (default) | Customized syntax | Preview (customized) |
---|---|---|---|---|
table-rh |
{{rh}} | Row header[2] | Templat:Rh | Row header | {{rh|align=right}} | Row header | Templat:Rh | Row header |
{{rh2}} | Row header[2] | Templat:Rh2 | Row header | {{rh2|align=right}} | Row header | Templat:Rh2 | Row header | |
table-yes |
{{yes}} | Yes | {{yes|Customized [[Plain text|text]]}} | Customized text |
{{ya}} | Templat:Ya | {{ya|Customized alt text|link=WP:ALT}} | Templat:Ya | |
table-no |
{{no}} | No | {{no|Customized [[Plain text|text]]}} | Customized text |
{{na}} | Templat:Ya | {{na|Customized alt text|link=WP:ALT}} | Templat:Na | |
{{coming soon}} | Templat:Coming soon | |||
{{bad}} | Templat:Bad | {{bad|F}} | Templat:Bad | |
{{eliminated}} | Templat:Eliminated | |||
table-siteactive |
{{site active}} | Templat:Site active | ||
table-siteinactive |
{{site inactive}} | Templat:Site inactive | ||
table-yes2 |
{{good}} | Templat:Good | {{good|A}} | Templat:Good |
{{yes2}} | Templat:Yes2 | {{yes2|Text}} | Templat:Yes2 | |
{{won}} | Menang | {{won|text=white|color=darkblue}} | Menang | |
{{won|place=1}} | 1 | {{won|place=Gold}} | Gold | |
{{won|place=2}} | 2 | {{won|place=Silver}} | Silver | |
{{won|place=3}} | 3 | {{won|place=Bronze}} | Bronze | |
table-no2 |
{{no2}} | Templat:No2 | {{no2|Text}} | Templat:No2 |
{{nom}} | Nominasi | {{nom|5}} | 5 | |
{{sho}} | Templat:Sho | |||
{{TBA}} | Templat:TBA | {{TBA|To be announced}} | Templat:TBA | |
table-partial |
{{partial}} | Templat:Partial | {{partial|Almost done}} | Templat:Partial |
{{yes-No}} | Templat:Yes-No | |||
{{okay}} | Templat:Okay | {{okay|C}} | Templat:Okay | |
{{some}} | Templat:Some | |||
table-any |
{{any}} | Templat:Any | ||
table-na |
{{n/a}} | N/A | ||
{{BLACK}} | Templat:BLACK | |||
table-unknown |
{{dunno}} | Templat:Dunno | {{dunno|Custom [[Plain text|text]]}} | Templat:Dunno |
{{unknown}} | Templat:Unknown | {{unknown|?}} | Templat:Unknown | |
table-depends |
{{depends}} | Templat:Depends | {{depends|Customized [[Plain text|text]]}} | Templat:Depends |
table-included |
{{included}} | Templat:Included | ||
table-dropped |
{{dropped}} | Templat:Dropped | ||
{{terminated}} | Templat:Terminated | |||
table-beta |
{{beta}} | Templat:Beta | ||
{{table-experimental}} | Templat:Table-experimental | {{table-experimental|Customized [[Plain text|text]]}} | Templat:Table-experimental | |
table-maybe |
{{maybe}} | Templat:Maybe | {{maybe|Customized [[Plain text|text]]}} | Templat:Maybe |
table-free |
{{free}} | Templat:Free | {{free|Customized [[Plain text|text]]}} | Templat:Free |
table-proprietary |
{{proprietary}} | Templat:Proprietary | {{proprietary|Customized [[Plain text|text]]}} | Templat:Proprietary |
table-nonfree |
{{nonfree}} | Templat:Nonfree | {{nonfree|Customized [[Plain text|text]]}} | Templat:Nonfree |
table-needs |
{{needs}} | Templat:Needs | {{needs|Customized [[Plain text|text]]}} | Templat:Needs |
table-nightly |
{{nightly}} | Templat:Nightly | {{nightly|Customized [[Plain text|text]]}} | Templat:Nightly |
table-release-candidate |
{{release-candidate}} | Templat:Release-candidate | {{release-candidate|Customized [[Plain text|text]]}} | Templat:Release-candidate |
no class | {{draw}} | Templat:Draw | {{draw|Text}} | Templat:Draw |
no class | {{incorrect}} | Templat:Incorrect | {{incorrect|Customized [[Plain text|text]]}} | Templat:Incorrect |
no class | {{no result}} | Templat:No result | {{no result|N.R.}} | Templat:No result |
no class | {{pending}} | Belum diputuskan | ||
no class | {{unofficial}} | Templat:Unofficial | ||
no class | {{usually}} | Templat:Usually | ||
no class | {{rarely}} | Templat:Rarely | ||
no class | {{sometimes}} | Templat:Sometimes | ||
no class | {{CMain}} | Templat:CMain | ||
no class | {{CRecurring}} | Templat:CRecurring | ||
no class | {{CGuest}} | Templat:CGuest | ||
no class | {{active fire}} | Templat:Active fire | ||
no class | {{contained}} | Templat:Contained |
CodeSunting
Common code to most if not all the templates in this series:
Code specific to this template:
To make a new table cell template you can use:
{{subst:Table cell templates| text = default text | bg = background color | class = a class name without prefix | align = standard horizontal alignment}}
You should leave out the align
parameter and often the class
parameter is unnecessary, too.
Add the new template to the table in the common documentation afterwards. Please consider reusing one of the other templates and please choose the color sensibly.
If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template! Instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped
, change that to {{{1|Dropped}}}
.
See alsoSunting
- {{multiplayer}}
- {{GPL-lic}}
- {{chg}}: calculate and display changes between two values
NotesSunting
- ↑ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
- ↑ 2,0 2,1 Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
Dokumentasi di atas ditransklusikan dari Templat:N/a/doc. (sunting | versi terdahulu) Penyunting dapat melakukan uji coba pada halaman bak pasir (buat | cermin) dan kasus uji (buat) templat ini. Mohon tambahkan kategori pada subhalaman /doc. Subhalaman templat ini. |