Template:Cell: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Yandere-sliver
No edit summary
>Yandere-sliver
No edit summary
 
Line 1: Line 1:
<includeonly>|colspan="{{{colspan|1}}}" rowspan="{{{rowspan|1}}}" style="vertical-align: middle; text-align: center; background: {{ #switch: {{lc:{{{1}}}}}|no|red|cross|enemy|inactive=<nowiki>#f99</nowiki>|yes|green|tick|ally|active=<nowiki>#9f9</nowiki>|#default={{{color|inherit}}} }};"|'''{{{2|{{ #switch: {{lc:{{{1}}}}}|no|cross={{symbol|Cross}}|unknown|question={{symbol|Question}}[[Category:In Use]]|yes|tick={{symbol|Tick}}|#default={{{1|{{symbol|Question}}}}} }}'''}}}</includeonly><noinclude>This template is used to create styled cells within wikitables.
<includeonly>|colspan="{{{colspan|1}}}" rowspan="{{{rowspan|1}}}" style="vertical-align: middle; text-align: center; background: {{ #switch: {{lc:{{{1}}}}}|no|red|cross|enemy|inactive=<nowiki>#f99</nowiki>|yes|green|tick|ally|active=<nowiki>#9f9</nowiki>|#default={{{color|inherit}}} }};"|'''{{{2|{{ #switch: {{lc:{{{1}}}}}|cross={{symbol|Cross}}|tick={{symbol|Tick}}|#default={{{1|{{symbol|Question}}}}} }}'''}}}</includeonly><noinclude>This template is used to create styled cells within wikitables.


The template replaces the cell, like this:
The template replaces the cell, like this:

Latest revision as of 15:55, 26 April 2019

This template is used to create styled cells within wikitables.

The template replaces the cell, like this:

{| class="wikitable"
|-
{{Cell|tick}}
| Maybe?
{{Cell|unknown|Maybe!}}
{{Cell|no|Never!}}
|}
{Tick} Maybe? Maybe! Never!

It only works with MediaWiki's table syntax, not with HTML <table> elements.

Cell styles

The first parameter specifies the cell styles. It must be one of the following:

cell style default display
cross {Cross}
tick {Tick}
default {Question}

Optional parameters

The second parameter can be used to override the text.

  • {{{colspan}}}: adjusts across how many columns the cell spans. Defaults to 1.
  • {{{rowspan}}}: adjusts across how many rows the cell spans. Defaults to 1.
  • {{{color}}}: if the inherent color option should be overwritten.