ic – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Add category)
m (Add CSS usage)
Line 1: Line 1:
<includeonly><code<includeonly/> style="border-color: #adc9e2; display: inline; margin: 0; padding: 0.33em; white-space: pre-wrap">{{{1|-No code provided-{{TemplateCase||[[Category:ic template usage error]]}}}}}</code<includeonly/>></includeonly><noinclude>{{Doc/Template
<includeonly><code class="inline">{{{1|{{{code|-No code provided-{{TemplateCase||[[Category:ic template usage error]]}}}}}}}}</code></includeonly><noinclude>{{Doc/Template
| descr = This template displays code with css display <tt>inline</tt> type. Adds the page to the [[:Category:ic template usage error|ic template usage error]] category on usage error.
|descr= This template displays '''i'''nline '''c'''ode. It also adds the page to the [[:Category:ic template usage error|ic template usage error]] category on usage error.
| param1 = code
|param1= code
| descr1 = the code to display. replace any <tt>{{=}}</tt> sign in it by <tt><nowiki>{{=}}</nowiki></tt>
|descr1= the code to display.<br>If it contains an equal sign <tt>=</tt>:
| example1 = <nowiki>{{ic}}</nowiki>
** replace it with <tt><nowiki>{{=}}</nowiki></tt>
| result1 = {{ic}}
** use <tt>code=</tt> (see example 4)
| example2 = <nowiki>{{ic|[[player]] [[setDamage]] 1;}}</nowiki>
** use the MediaWiki trick <tt>1=</tt> (see example 5)
| result2 = {{ic|[[player]] [[setDamage]] 1;}}
|example1= <nowiki>{{ic}}</nowiki>
| example3 = <nowiki>{{ic|_fog {{=}} [[fog]];}}</nowiki>
|result1= {{ic}}
| result3 = {{ic|_fog {{=}} [[fog]];}}
|example2= <nowiki>{{ic|[[player]] [[setDamage]] 1;}}</nowiki>
|result2= {{ic|[[player]] [[setDamage]] 1;}}
|example3= <nowiki>{{ic|_fog {{=}} [[fog]];}}</nowiki>
|result3= {{ic|_fog {{=}} [[fog]];}}
|example4= <nowiki>{{ic|code= _fog = [[fog]];}}</nowiki>
|result4= {{ic|code= _fog = [[fog]];}}
|example5= <nowiki>{{ic|1= _fog = [[fog]];}}</nowiki>
|result5= {{ic|1= _fog = [[fog]];}}
}}</noinclude>
}}</noinclude>

Revision as of 18:08, 15 November 2021

This template displays inline code. It also adds the page to the ic template usage error category on usage error.

This template is used on these pages.

Usage

{{ic|code}}

  • code: the code to display.
    If it contains an equal sign =:
    • replace it with {{=}}
    • use code= (see example 4)
    • use the MediaWiki trick 1= (see example 5)
Examples
Code Result
{{ic}} -No code provided-
{{ic|[[player]] [[setDamage]] 1;}} player setDamage 1;
{{ic|_fog {{=}} [[fog]];}} _fog = fog;
{{ic|code= _fog = [[fog]];}} _fog = fog;
{{ic|1= _fog = [[fog]];}} _fog = fog;