Lompat ke isi

Citakan:Table cell templates/doc

Ti Wikipédia Sunda, énsiklopédi bébas

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:

Enya Henteu rowspan=2 Citakan:N/a
colspan=2 Citakan:Yes-No
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Yes-No}}
...

Templates in this series

[édit sumber]
Table cell templates
Class[1] Default syntax Preview (default) Customized syntax Preview (customized)
table-rh {{rh}} | Row header[2] Row header {{rh|align=right}} | Row header Row header
{{rh2}} | Row header[2] Citakan:Rh2 | Row header {{rh2|align=right}} | Row header Citakan:Rh2 | Row header
table-yes {{yes}} Enya {{yes|Customized [[Plain text|text]]}} Customized text
{{ya}} Citakan:Ya {{ya|Customized alt text}} Citakan:Ya
table-no {{no}} Henteu {{no|Customized [[Plain text|text]]}} Customized text
{{na}} Citakan:Ya {{na|Customized alt text}} Citakan:Na
{{coming soon}} Citakan:Coming soon
{{bad}} Citakan:Bad {{bad|F}} Citakan:Bad
{{eliminated}} Citakan:Eliminated
table-siteactive {{site active}} Citakan:Site active
table-siteinactive {{site inactive}} Citakan:Site inactive
table-yes2 {{good}} Citakan:Good {{good|A}} Citakan:Good
{{yes2}} {{yes2|Text}}
{{won}} Citakan:Won {{won|text=white}} Citakan:Won
{{won|place=1}} Citakan:Won {{won|place=Gold}} Citakan:Won
{{won|place=2}} Citakan:Won {{won|place=Silver}} Citakan:Won
{{won|place=3}} Citakan:Won {{won|place=Bronze}} Citakan:Won
table-no2 {{no2}} Citakan:No2 {{no2|Text}} Citakan:No2
{{nom}} Citakan:Nom {{nom|5}} Citakan:Nom
{{sho}} Citakan:Sho
{{TBA}} Citakan:TBA {{TBA|To be announced}} Citakan:TBA
table-partial {{partial}} Citakan:Partial {{partial|Almost done}} Citakan:Partial
{{yes-No}} Citakan:Yes-No
{{okay}} Citakan:Okay {{okay|C}} Citakan:Okay
{{some}} Citakan:Some
table-any {{any}} Citakan:Any
table-na {{n/a}} Citakan:N/a
{{BLACK}} Citakan:BLACK
table-unknown {{dunno}} Citakan:Dunno {{dunno|Custom [[Plain text|text]]}} Citakan:Dunno
{{unknown}} Citakan:Unknown {{unknown|?}} Citakan:Unknown
table-depends {{depends}} Citakan:Depends {{depends|Customized [[Plain text|text]]}} Citakan:Depends
table-included {{included}} Citakan:Included
table-dropped {{dropped}} Citakan:Dropped
{{terminated}} Citakan:Terminated
table-beta {{beta}} Citakan:Beta
{{table-experimental}} Citakan:Table-experimental {{table-experimental|Customized [[Plain text|text]]}} Citakan:Table-experimental
table-maybe {{maybe}} Citakan:Maybe {{maybe|Customized [[Plain text|text]]}} Citakan:Maybe
table-free {{free}} Citakan:Free {{free|Customized [[Plain text|text]]}} Citakan:Free
table-proprietary {{proprietary}} Citakan:Proprietary {{proprietary|Customized [[Plain text|text]]}} Citakan:Proprietary
table-nonfree {{nonfree}} Citakan:Nonfree {{nonfree|Customized [[Plain text|text]]}} Citakan:Nonfree
table-needs {{needs}} Citakan:Needs {{needs|Customized [[Plain text|text]]}} Citakan:Needs
table-nightly {{nightly}} Citakan:Nightly {{nightly|Customized [[Plain text|text]]}} Citakan:Nightly
table-release-candidate {{release-candidate}} Citakan:Release-candidate {{release-candidate|Customized [[Plain text|text]]}} Citakan:Release-candidate
no class {{draw}} Citakan:Draw {{draw|Text}} Citakan:Draw
no class {{incorrect}} Citakan:Incorrect {{incorrect|Customized [[Plain text|text]]}} Citakan:Incorrect
no class {{no result}} Citakan:No result {{no result|N.R.}} Citakan:No result
no class {{pending}} Citakan:Pending
no class {{unofficial}} Citakan:Unofficial
no class {{usually}} Citakan:Usually
no class {{rarely}} Citakan:Rarely
no class {{sometimes}} Citakan:Sometimes
no class {{CMain}} Citakan:CMain
no class {{CRecurring}} Citakan:CRecurring
no class {{CGuest}} Citakan:CGuest
no class {{active fire}} Citakan:Active fire
no class {{contained}} Citakan:Contained

Common code to most if not all the templates in this series:

This template documentation is transcluded from Template:Table cell templates [edit]

These templates are designed to be used in a table to make a cell with text in that cell, with an appropriately coloured 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 template parameter and defaults to "Yes".

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}}}.

Templates in this series

[édit sumber]
CSS class[1] Templates Preview 1 Preview 2 Preview 3
table-rh {{rh}}[2] | Row header Row header
table-yes {{yes}}, {{yes|[[Alternate]] text}} Enya Alternate text
table-no {{no}} Henteu
table-yes2 {{yes2}}[3] Text Text
table-no2 {{no2}}[3] Text Citakan:No2 Text
table-partial {{partial}}, {{Yes-No}}, {{some}} Citakan:Partial Citakan:Yes-No Citakan:Some
table-but-yes {{but yes}} Citakan:But yes
table-but-no {{but no}} Citakan:But no
table-na {{n/a}} Citakan:N/a
table-unknown {{dunno}}, {{unk}} Citakan:Dunno Citakan:Unk
table-depends {{depends}} Citakan:Depends
table-included {{included}} Citakan:Included
table-dropped {{dropped}}, {{terminated}} Citakan:Dropped Citakan:Terminated
table-beta {{beta}} Citakan:Beta
table-free {{free}} Citakan:Free
table-nonfree {{nonfree}}[3] [[US$]]3.14 Citakan:Nonfree US$3.14
unstyled {{incorrect}} Citakan:Incorrect
unstyled {{?}}[4] Citakan:?
  1. a b The HTML class of table cell templates may be referenced in a user stylesheet to change appearance. Salah ngutip: Tanda <ref> tidak sah; nama "table-cell-templates-table-css" didefinisikan berulang dengan isi berbeda
  2. a b c Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. a b c Does not take a parameter; the content should be placed after the template call.
  4. Does not take a parameter; not really a table cell template at all, but here for completeness


Code specific to this template:

This template documentation is transcluded from Template:Table cell templates [edit]

These templates are designed to be used in a table to make a cell with text in that cell, with an appropriately coloured 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 template parameter and defaults to "Yes".

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}}}.

Templates in this series

[édit sumber]
CSS class[1] Templates Preview 1 Preview 2 Preview 3
table-rh {{rh}}[2] | Row header Row header
table-yes {{yes}}, {{yes|[[Alternate]] text}} Enya Alternate text
table-no {{no}} Henteu
table-yes2 {{yes2}}[3] Text Text
table-no2 {{no2}}[3] Text Citakan:No2 Text
table-partial {{partial}}, {{Yes-No}}, {{some}} Citakan:Partial Citakan:Yes-No Citakan:Some
table-but-yes {{but yes}} Citakan:But yes
table-but-no {{but no}} Citakan:But no
table-na {{n/a}} Citakan:N/a
table-unknown {{dunno}}, {{unk}} Citakan:Dunno Citakan:Unk
table-depends {{depends}} Citakan:Depends
table-included {{included}} Citakan:Included
table-dropped {{dropped}}, {{terminated}} Citakan:Dropped Citakan:Terminated
table-beta {{beta}} Citakan:Beta
table-free {{free}} Citakan:Free
table-nonfree {{nonfree}}[3] [[US$]]3.14 Citakan:Nonfree US$3.14
unstyled {{incorrect}} Citakan:Incorrect
unstyled {{?}}[4] Citakan:?
  1. The CSS class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. a b c Does not take a parameter; the content should be placed after the template call.
  4. Does not take a parameter; not really a table cell template at all, but here for completeness


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 also

[édit sumber]