Difference between revisions of "Template:UnitDef"

From SCS Modding Wiki
Jump to navigation Jump to search
(New template for unit definitions (adds collapsible functionality))
 
m (Correction to example usage)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>This template simplifies inclusion of raw unit structures on their wikipage by applying standard formatting. The result is a collapsible section with a 300px-tall, scrollable preformatted text section. For best results, use '''&lt;nowiki&gt;''' tags to prevent double-braces from prematurely closing the template: <code><nowiki>{{UnitDef|&lt;nowiki&gt;def&lt;/nowiki&gt;}}</nowiki></code>
+
<noinclude>This template simplifies inclusion of raw unit structures on their wikipage by applying standard formatting. The result is a collapsible section with a 300px-tall, scrollable preformatted text section. For best results, use '''&lt;nowiki&gt;''' tags to prevent double-braces from prematurely closing the template: <code><nowiki>{{UnitDef|def=&lt;nowiki&gt;def&lt;/nowiki&gt;}}</nowiki></code>
 
</noinclude>
 
</noinclude>
 
<div class="mw-collapsible mw-collapsed">
 
<div class="mw-collapsible mw-collapsed">
 
== Raw Unit Definition ==
 
== Raw Unit Definition ==
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
<pre style="max-height:300px;overflow:auto">{{{def}}}</pre></div>
+
{{#tag:pre|{{{def}}}|style="max-height:300px;overflow:auto"}}</div>
 
</div>
 
</div>

Latest revision as of 18:54, 17 February 2017

This template simplifies inclusion of raw unit structures on their wikipage by applying standard formatting. The result is a collapsible section with a 300px-tall, scrollable preformatted text section. For best results, use <nowiki> tags to prevent double-braces from prematurely closing the template: {{UnitDef|def=<nowiki>def</nowiki>}}

Raw Unit Definition

{{{def}}}