Template:Code Reference: Difference between revisions

add documentation
m (revert)
(add documentation)
Line 1: Line 1:
<includeonly>{{#if:{{{class|}}}|<ref><code>{{{namespace|XRL.World.Parts}}}.{{{class}}}{{#if:{{{method|}}}|, method {{{method}}}}}</code></ref>|[[Category:Pages with part reference errors]]}}</includeonly>
<noinclude>This template is used for cohesive citation of the game's C# classes. It's called like so:
 
<pre><nowiki>{{Part Reference
| namespace = Fake.Namespace
| class    = FakeClass
| method    = FakeMethod
}}</nowiki></pre>
 
All parameters except <code>class</code> can usefully be omitted:
 
* If <code>class</code> is missing, the page will be tagged with [[:Category:Pages with part reference errors]].
* If <code>namespace</code> is missing, it defaults to <code>XRL.World.Parts</code>.
* If <code>method</code> is missing, the descriptive text related to it is omitted.
 
The above example results in the following citation:{{Part Reference
| namespace = Fake.Namespace
| class    = FakeClass
| method    = FakeMethod
}}</noinclude><includeonly>{{#if:{{{class|}}}|{{#tag:ref|<code>{{{namespace|XRL.World.Parts}}}.{{{class}}}{{#if:{{{method|}}}|, method {{{method}}}}}</code>}}|[[Category:Pages with part reference errors]]}}</includeonly>