Template:NA: Difference between revisions
(Created page with "<includeonly>class="table-na nohighlight" style="text-align: {{{align|center}}}; {{{style|}}};" {{#if:{{{data-sort|}}}|data-sort-value="{{{data-sort}}}"|}} {{#if:{{{colspan|}}}|colspan={{{colspan}}}}} {{#if:{{{rowspan|}}}|rowspan={{{rowspan}}}}}<!-- -->| <small>{{{1|N/A}}}</small></includeonly><noinclude>{{/doc}}</noinclude>") |
(Default to empty sort-value (instead of arbitrarily sorting by "N" if not given)) |
||
Line 1:
<includeonly>class="table-na nohighlight" style="text-align: {{{align|center}}}; {{{style|}}};"
-->| <small>{{{1|N/A}}}</small></includeonly><noinclude>{{/doc}}</noinclude>
|
Latest revision as of 18:18, 19 November 2024
This template displays a table cell with the provided text, or the letters "N/A" if no text is provided.
The contents of the cell will be center-aligned unless the optional align
parameter is used to specify otherwise. The styling can be further customised using the optional style
parameter. The optional data-sort
parameter can be used to provide a value used for sorting within the table.
Usage
This template can be used by entering the following onto a relevant page, within a table cell.
{{NA}}
N/A | Y | N |
---|---|---|
Y | Y | Y |
N | Y | N/A |
colspan
Use this parameter to adjust the column width.
rowspan
Use this parameter to adjust the row height.
{{NA|colspan=2|rowspan=2}}
Y | N/A | N | |
---|---|---|---|
Y | Y | Y | Y |
N | Y | N/A | |
Y |
text
Use may also change the text presented simply by doing the following:
{{NA|Perhaps}}
N/A | Y | N |
---|---|---|
Y | Y | Y |
N | Y | Perhaps |
style
Allows adding arbitrary inline CSS to the cell.
{{NA|style=text-align:left;}} {{NA|style=text-align:right;}}
Q wider | Y wider | N wider |
---|---|---|
Y | Y | Y |
N | N/A | N/A |
data-sort
Allows setting a specific sort value for the cell in sortable tables.
{{NA|data-sort=zz}}
N/A | Y | N |
---|---|---|
Y | Y | Y |
N | Y | N/A |
N/A | N | N |
Note how the NA in column 1 (which has no data-sort
) is sorted before everything else, while the NA in column 3 (with data-sort="zz"
) is sorted after Y.