n/a – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add some examples)
m (Use CSS class)
Line 1: Line 1:
<includeonly>style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!--
<includeonly>class="na-cell" style="{{{style|}}}" <!--
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small></includeonly><noinclude>
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small></includeonly><noinclude>
Fills ''a table '''cell''''' in grey, with N/A text by default.
Fills ''a table '''cell''''' in grey, with N/A text by default.
Line 45: Line 45:
== Source ==
== Source ==
<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!--
class="na-cell" style="{{{style|}}}" <!--
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small>
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small>
</syntaxhighlight>
</syntaxhighlight>

Revision as of 20:45, 29 October 2020

Fills a table cell in grey, with N/A text by default.

This template has to be inside a table cell, e.g:

{| class="wikitable" ! First Name !! Last Name |- | {{n/a}} || Miller |}

First Name Last Name
N/A Miller
If put in a text paragraph, it results in class="na-cell" style="" | N/A.

Usage

{{n/a|text|align|style}}

  • text: (Optional, default "N/A")
  • align: (Optional, default "center". Named parameter only) text alignment. can be left, center or right
  • style: (Optional, default "". Named parameter only) additional CSS (e.g font-weight: bold)
Examples
Code Result
{{n/a}} N/A
{{n/a|abc}} abc
{{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}} wabbit

Source

class="na-cell" style="{{{style|}}}" <!--
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small>