n/a – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(category)
m (Fix <tt> usage)
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}</includeonly><noinclude>
Fills ''a table '''cell''''' in grey, with N/A text by default.
{{Feature | important | This template has to be ''inside'' a table cell, e.g:
{{{!}}
{{!}}
<code><nowiki>{| class="wikitable"
! First Name !! Last Name
|-
| {{n/a}} || Miller
|}</nowiki></code>
{{!}} style{{=}}"text-align: center; width: 5em" {{!}} →
{{!}}
{{{!}} class{{=}}"wikitable"
! First Name !! Last Name
{{!}}-
{{!}} {{n/a}} {{!}}{{!}} Miller
{{!}}}
{{!}}}
If put in a text paragraph, it results in {{hl|{{n/a}}}}.}}
== Usage ==
<code>{{<nowiki/>n/a|'''''text'''''|'''''style'''''}}</code>
* text: (Optional, default "N/A")
* style: (Optional, default "". Named parameter only) additional CSS (e.g {{hl|font-weight: bold}})
{| class="wikitable"
{| class="wikitable"
|+ Examples
! Code
! style="width: 10em" | Result
|-
| <nowiki>{{n/a}}</nowiki>
| {{n/a}}
|-
| <nowiki>{{n/a|abc}}</nowiki>
| {{n/a|abc}}
|-
|-
  | <onlyinclude>style="background: #ececec; color: grey; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="table-na" <!--
| <nowiki>{{n/a|style=font-size: 2em; font-weight: bold;text-align: right|wabbit}}</nowiki>
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small></onlyinclude>
| {{n/a|align=right|style=font-size: 2em; font-weight: bold; text-align: right|wabbit}}
|}
|}
[[Category:Templates|{{PAGENAME}}]]
 
== Source ==
<syntaxhighlight lang="html">
class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}
</syntaxhighlight>
 
 
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
</noinclude>

Revision as of 17:52, 27 May 2022

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" | N/A.

Usage

{{n/a|text|style}}

  • text: (Optional, default "N/A")
  • 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|style=font-size: 2em; font-weight: bold;text-align: right|wabbit}} wabbit

Source

class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}