Template:Code Reference: Difference between revisions

add comment parameter
(add name parameter)
(add comment parameter)
Line 14: Line 14:
|-
|-
| <code>case</code>      || No        || ''(None)''                      || If both this and <code>method</code> are provided, the context will be further narrowed down to a specific conditional case in the given method.
| <code>case</code>      || No        || ''(None)''                      || If both this and <code>method</code> are provided, the context will be further narrowed down to a specific conditional case in the given method.
|-
| <code>comment</code>  || No        || ''(None)''                      || A freeform natural-language addendum that further clarifies or explains the reference.
|-
|-
| <code>name</code>      || No        || ''(None)''                      || If this is present, the citation will be named so that it can be referred to again later by the same name with <code><nowiki><ref name="the-name-you-chose" /></nowiki></code>
| <code>name</code>      || No        || ''(None)''                      || If this is present, the citation will be named so that it can be referred to again later by the same name with <code><nowiki><ref name="the-name-you-chose" /></nowiki></code>
Line 78: Line 80:
[[Category:Templates]]</noinclude><includeonly>{{#if: {{{class |}}}
[[Category:Templates]]</noinclude><includeonly>{{#if: {{{class |}}}
| {{#if: {{{name |}}}
| {{#if: {{{name |}}}
     | {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} |, in the <code>{{{case}}}</code> case}}}}|name={{{name}}}}}
     | {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} | , in the <code>{{{case}}}</code> case}}}}{{#if: {{{comment |}}} | {{Space}}– {{{comment}}}}} | name={{{name}}}}}
     | {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} |, in the <code>{{{case}}}</code> case}}}}}}
     | {{#tag: ref | <code>{{{namespace | XRL.World.Parts}}}.{{{class}}}</code>{{#if: {{{method |}}} |, method <code>{{{method}}}</code>{{#if: {{{case |}}} | , in the <code>{{{case}}}</code> case}}}}{{#if: {{{comment |}}} | {{Space}}– {{{comment}}}}}}}
}}
}}
| {{Template Error}}
| {{Template Error}}
}}</includeonly>
}}</includeonly>