Daripada Wikipedia, ensiklopedia bebas.
Jump to navigation Jump to search
Pendokumenan templat[lihat] [sunting] [sejarah] [nyahcache]

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.

⚠ Important: 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:

Ya Tidak N/A
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|colspan=2 {{Yes-No}}

Templates[sunting 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] Row header {{rh2|align=right}} | Row header Row header
table-yes {{yes}} Ya {{yes|customized [[plain text|text]]}} customized text
{{yes C}} Green check.svg Ya {{yes C|}} Green check.svg
{{yes O}} Symbol confirmed.svg Ya {{yes O|}} Symbol confirmed.svg
table-maybe {{maybe}} Mungkin {{maybe|customized [[plain text|text]]}} customized text
table-no {{no}} Tidak {{no|customized [[plain text|text]]}} customized text
{{no O}} Pictogram voting delete.svg Tidak {{no O|}} Pictogram voting delete.svg
{{no X}} Templat:No X {{no X|}} Templat:No X
{{eliminated}} Templat:Eliminated {{eliminated|dropped out}} Templat:Eliminated
{{active fire|12%}} Templat:Active fire
{{lost}} || {{lost|missing}} ||
{{safe}} Templat:Safe {{safe|protected}} Templat:Safe
table-active {{active}} Templat:Active {{active|live}} Templat:Active
table-siteactive {{site active}} Templat:Site active {{site active|up}} Templat:Site active
{{coming soon}} Akan datang {{coming soon|second half of the year}} second half of the year
table-siteinactive {{site inactive}} Templat:Site inactive {{site inactive|down}} Templat:Site inactive
table-yes2 {{good}} Templat:Good {{good|A}} Templat:Good
{{yes2}} {{yes2|text}} text
{{ya}} Ya {{ya|text=ya}} ya
{{ya|Ya}} Ya {{ya|text|link=WP:ALT}} text
{{won}} Menang {{won|text=white|color=darkblue|winner}} winner
{{won|place=1}} 1 {{won|place=gold}} gold
{{won|place=2}} 2 {{won|place=silver}} silver
{{won|place=3}} 3 {{won|place=bronze}} bronze
{{WinDL}} Templat:WinDL {{WinDL|win}} Templat:WinDL
{{WinDL|res=D}} Templat:WinDL {{WinDL|res=draw}} Templat:WinDL
{{WinDL|res=L}} Templat:WinDL {{WinDL|res=loss}} Templat:WinDL
table-no2 {{no2}} {{no2|text}} text
{{na}} Tidak {{na|text=na}} na
{{na|Na}} Na {{na|text|link=WP:ALT}} text
{{nom}} Tercalon {{nom|5}} 5
{{sho}} Disenarai pendek {{sho|proposed}} proposed
{{longlisted}} Templat:Longlisted {{longlisted|rejected}} Templat:Longlisted
{{TBA}} Akan diumumkan {{TBA|to be announced}} to be announced
table-success {{success}} Templat:Success {{success|mission complete}} Templat:Success
{{operational}} Templat:Operational {{operational|returning data}} Templat:Operational
table-failure {{failure}} Templat:Failure {{failure|wrong orbit}} Templat:Failure
table-partial {{partial}} Sebahagian {{partial|almost done}} almost done
{{Regional}} Templat:Regional {{Regional|Uyghur}} Templat:Regional
{{MaybeCheck}} Templat:MaybeCheck {{MaybeCheck|text=possibly}} Templat:MaybeCheck
{{MaybeCheck|possibly}} Templat:MaybeCheck {{MaybeCheck|text|link=WP:ALT}} Templat:MaybeCheck
{{partial success}} Templat:Partial success {{partial success|reached orbit and returned pictures}} Templat:Partial success
{{partial failure}} Templat:Partial failure {{partial failure|[[Cubesat]] not deployed}} Templat:Partial failure
{{okay}} Templat:Okay {{okay|C}} Templat:Okay
{{Yes-No}} Ya/Tidak {{Yes-No|yes with an if; no with a but}} yes with an if; no with a but
{{some}} Beberapa {{some|many}} many
{{nonpartisan}} Templat:Nonpartisan {{nonpartisan|impartial}} Templat:Nonpartisan
{{pending}} Menunggu {{pending|awaiting}} awaiting
{{unofficial}} Tidak rasmi {{unofficial|''de facto''}} de facto
{{unofficial2}} Templat:Unofficial2 {{unofficial2|''de facto''}} Templat:Unofficial2
{{usually}} Templat:Usually {{usually|commonly}} Templat:Usually
{{rarely}} Templat:Rarely {{rarely|seldom}} Templat:Rarely
{{sometimes}} Templat:Sometimes {{sometimes|occasionally}} Templat:Sometimes
table-noAttempt {{No attempt}} Templat:No attempt {{No attempt|No landing attempted}} Templat:No attempt
table-any {{any}} Templat:Any {{any|anyone}} Templat:Any
table-na {{n/a}} N/A {{n/a|unavailable}} unavailable
{{varies}} Templat:Varies {{varies|differs}} Templat:Varies
{{sdash}} {{sdash|[[File:Dash.svg|13px|link=|dash icon]]}} dash
{{BLACK}} N/A {{BLACK|banned}} banned
{{non-album single}} Templat:Non-album single {{non-album single|EP}} Templat:Non-album single
{{unreleased}} Templat:Unreleased {{unreleased|shelved}} Templat:Unreleased
table-unknown {{unknown}} Tidak diketahui {{unknown|?}} ?
{{dunno}} ? {{dunno|not sure}} not sure
table-automatic {{perhaps}} Templat:Perhaps {{perhaps|maybe}} Templat:Perhaps
table-depends {{depends}} Bergantung {{depends|vendor-defined}} vendor-defined
table-included {{included}} Termasuk {{included|incorporated}} incorporated
table-dropped {{dropped}} Digugurkan {{dropped|discontinued}} discontinued
{{terminated}} Dihentikan {{terminated|fired}} fired
table-beta {{beta}} Beta {{beta|preview}} preview
table-experimental {{table-experimental}} Templat:Table-experimental {{table-experimental|lab}} Templat:Table-experimental
table-free {{free}} Percuma {{free|empty}} empty
table-proprietary {{proprietary}} Templat:Proprietary {{proprietary|custom extension}} Templat:Proprietary
table-nonfree {{nonfree}} Tidak-percuma {{nonfree|paid}} paid
table-needs {{needs}} Templat:Needs {{needs|req.}} Templat:Needs
table-nightly {{nightly}} Templat:Nightly {{nightly|dev}} Templat:Nightly
table-release-candidate {{release-candidate}} Templat:Release-candidate {{release-candidate|RC}} Templat:Release-candidate
table-draw {{draw}} {{draw|1:1}} 1:1
table-planned {{planned}} Templat:Planned {{planned|July 2028}} Templat:Planned
table-scheduled {{scheduled}} Templat:Scheduled {{scheduled|3 March 2027}} Templat:Scheduled
incorrect {{incorrect}} Tidak betul {{incorrect|wrong}} wrong
noresult {{no result}} Templat:No result {{no result|NR}} Templat:No result
table-debate {{D-P}} Templat:D-P {{D-P|present}} Templat:D-P
{{D-A}} Templat:D-A {{D-A|absent}} Templat:D-A
{{D-I}} Templat:D-I {{D-I|invited}} Templat:D-I
{{D-O}} Templat:D-O {{D-O|invited to other debate}} Templat:D-O
{{D-N}} Templat:D-N {{D-N|not invited}} Templat:D-N
{{D-Nv}} Templat:D-Nv {{D-Nv|not voting}} Templat:D-Nv
{{D-W}} Templat:D-W {{D-W|withdrawn}} Templat:D-W
{{D-Out}} Templat:D-Out {{D-Out|out of race}} Templat:D-Out
table-cast {{CMain}} Utama {{CMain|text}} text
{{CAlso starring}} Templat:CAlso starring {{CAlso starring|costar}} Templat:CAlso starring
{{CRecurring}} Berulang {{CRecurring|regular guest}} regular guest
{{CGuest}} Tetamu {{CGuest|victim}} victim
{{COther}} Templat:COther {{COther|ensemble}} Templat:COther
{{CNone}} Templat:CNone {{CNone|cast}} Templat:CNone
{{CEmpty}} Templat:CEmpty
{{CRemoved}} Templat:CRemoved {{CRemoved|edited}} Templat:CRemoved
{{CFinalist}} Templat:CFinalist {{CFinalist|text=white|color=darkblue|contender}} Templat:CFinalist
{{CFinalist|place=3rd Place}} Templat:CFinalist {{CFinalist|place=third place}} Templat:CFinalist
{{exempt}} Templat:Exempt {{Black Exempt}} Templat:Black Exempt
{{nocontest}} Templat:Nocontest {{nocontest|rescheduled}} Templat:Nocontest
{{Runner-up}} Templat:Runner-up {{Runner-up|2nd place}} Templat:Runner-up
{{Quit}} Templat:Quit {{Quit|left}} Templat:Quit
no class {{not yet}} Belum {{not yet|NY}} NY
{{optional}} Pilihan {{optional|non-mandatory}} non-mandatory
{{shade|25}}% Templat:Shade% {{shade|75}}% Templat:Shade%

Code[sunting sumber]

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

style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|text-transform: capitalize;}}}" class="automatic table-automatic"| {{{1|text}}}

Code specific to this template:

style="background:#F99;vertical-align:middle;text-align:center;" class="table-no"|Tidak

Creating new templates[sunting sumber]

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

style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="automatic table-automatic"| {{{1|text}}}

Color subpage[sunting sumber]

All templates should either have a /bgcolor subpage that contains nothing but a valid CSS color code, possibly wrapped in nowiki tags, e.g. #BFD, which can be included with background: {{/bgcolor}}; in the style attribute, or they should reference another template's subpage, e.g. background: {{Template:Yes2/bgcolor}};. Alternatively, the /bgcolor subpage may redirect to another color code subpage: #REDIRECT [[yes2/bgcolor]].

This way, pages that are using these templates may also use {{legend}} and similar templates which can reference the actual color: {{legend|{{yes2/bgcolor}}|supported}}

TemplateData[sunting sumber]

Berikut ialah pendokumenan TemplateData untuk templat ini yang digunakan oleh VisualEditor dan alatan-alatan lain; lihat laporan penggunaan parameter bulanan untuk templat ini.

TemplateData untuk Tidak

Kategori:Templat menggunakan TemplateData

One of several templates for styling individual table cells with standard contents and colors.

Parameter templat

Templat ini lebih menyukai pemformatan parameter dalam baris.


text to be displayed instead of the default, if this doesn't work put the text after the template, possibly with a vertical bar | in between

(template dependent)
horizontal alignalign

text alignment inside the cell, either 'left', 'right', 'center' or 'justified'


a semicolon separated list of additional CSS rules to be applied to the table cell

(template dependent)
background colorcolor

a valid CSS color value or name to override the standard the cell background, only available with some templates

(template dependent)

See also[sunting sumber]

  • {{Change}} – calculates, displays and color-codes changes between two values
  • {{BSD-lic}} – specialized redirect for {{free}}
  • {{GPL-lic}} – specialized redirect for {{free}}
  • {{LGPL-lic}} – specialized redirect for {{free}}

Notes[sunting sumber]

  1. ^ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. ^ a b Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.