Difference between revisions of "Template:Part config"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*more specific category; !use plural for the category in which this template adds pages;)
m (Add support for longer paths)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Box|type=notice|2=This is the configuration file for {{#if: {{{1|}}}|[[{{{1}}}]]|a part}}.}}{{#if: {{{2<includeonly>|</includeonly>}}}|
+
{{Box|type=notice|This is the configuration file for {{#if: {{{1|}}}|[[{{{1}}}]]|a part}}.}}{{#if: {{{2<includeonly>|</includeonly>}}}|
  
<pre<includeonly></includeonly> style="white-space:pre-wrap;">{{{2}}}</pre>}}
+
<!--<pre style="white-space:pre-wrap;">{{{2}}}</pre>}} --><!-- The original template -->
<includeonly>[[Category:Part configuration files|{{#titleparts:{{PAGENAME}}|1|{{#if: {{#titleparts:{{PAGENAME}}|1|4}}|3|2}}}}]]</includeonly><noinclude>
+
<pre<includeonly></includeonly> style="white-space:pre-wrap;"><!--
----
+
--><noinclude>{{#if:{{{2|}}}|</noinclude>{{{2|}}}<noinclude>|</noinclude>}}<!--
{{Parameter Table|parameters=
+
--></pre>
{{Parameter Row|1|The part's name. Creates a link to it when set.|Not set/<tt>a part</tt>}}
+
<includeonly>[[Category:Part configuration files|{{#titleparts:{{PAGENAME}}|1|{{#if: {{#titleparts:{{PAGENAME}}|1|5}}|4|{{#if: {{#titleparts:{{PAGENAME}}|1|4}}|3|2}}}}}}]]</includeonly><noinclude>{{Documentation}}</noinclude>
{{Parameter Row|2|2=The part's config without &lt;pre&gt; tags. When multiple curly brackets (<tt>}</tt>) are in the configuration directly together use the HTML entity &amp;#125;. Most likely this has to be given explicitly (''<tt>2=...</tt>'').|3=Not set/Hidden}}
 
}}
 
 
 
This template automatically add the file to [[:Category:Part configuration files]].
 
 
 
[[Category:Box templates]]
 
[[Category:Categorising templates]]</noinclude>
 

Latest revision as of 16:35, 19 October 2024

This is the configuration file for a part.
{{#if: {{{2}}}|

Documentation icon Template documentation[view] [edit] [history] [purge]Pages that link to Template:Part config

Usage

{{Part config|Part name|2=Config file}}

# Optional Description Default
1 Yes The part's name. Creates a link to it when set. Not set/a part
2 Yes The part's config without <pre> tags. When multiple curly brackets (}) are in the configuration directly together use the HTML entity &#125;. Most likely this has to be given explicitly (2=...). Not set/Hidden

This template automatically adds the page to Category:Part configuration files.