Template:SpecialVariable: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Draft for new Special Variable template)
 
m (→‎Source: Fix headings.)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
[[Category:Draft]]
=Template Usage=
=Template Usage=
''You should always write the description as though the words "This special variable..." are automatically supplied by the template.''
''You should always write the description as though the words "This special variable..." are automatically supplied by the template.''
Line 9: Line 8:
|name=example.specialvar
|name=example.specialvar
|proposed=true
|proposed=true
|deprecated=
|deprecated=[[newFunction|newFunction()]]
[[newFunction|newFunction()]]
|macroequiv=
[[equivFunction|equivFunction()]]
|version=1.5.0
|version=1.5.0
|compatibility=1.9.0
|compatibility=1.9.0
|description=
|description=Refers to some MapTool internal data for quick access in Macros. This example of course doesn't refer to any real special variable, but it will when you use this template! "&amp;nbsp;"
Refers to some MapTool internal data for quick access in Macros. This example of course doesn't refer to any real special variable, but it will when you use this template! "&amp;nbsp;"
{{__TOC__}}
{{__TOC__}}
|usage=
|usage=
Line 32: Line 27:
DA74EB9CAA9B47C9970FFC45DB259949
DA74EB9CAA9B47C9970FFC45DB259949
</source>
</source>
|macroequiv=
[[equivFunction|equivFunction()]]


|also=
|also=
Line 39: Line 37:
* '''1.5.5''' - Correctly trims output.
* '''1.5.5''' - Correctly trims output.
}}</pre>
}}</pre>
=Source=
=Source=
</noinclude>{{#ifeq: {{{proposed|}}} | true | {{ProposedChange}} |}}{{#if: {{{deprecated|}}} | {{Deprecated|{{{deprecated}}} |}} |}}
Edit this section to view template source.
=={{{name}}}() Function==
</noinclude><includeonly>{{#ifeq: {{{proposed|}}} | true | {{ProposedChange}} |}}{{#if: {{{deprecated|}}} | {{Deprecated|{{{deprecated}}} |}} |}}
=={{{name}}} Special Variable==
{{#if: {{{version|}}} | <div class="template_version">• '''Introduced in version {{{version|}}}'''</div> |}}
{{#if: {{{version|}}} | <div class="template_version">• '''Introduced in version {{{version|}}}'''</div> |}}
{{#if: {{{compatibility|}}} | <div class="template_compatibility">• '''Last checked for compatibility with version {{{compatibility|}}}'''</div> |}}<div class="template_description">{{{description|}}}</div>
{{#if: {{{compatibility|}}} | <div class="template_compatibility">• '''Last checked for compatibility with version {{{compatibility|}}}'''</div> |}}
===Usage===
<div class="template_description">{{{description|}}}</div>
==Usage==
{{{usage}}}
{{{usage}}}
{{#if: {{{example|}}} |
{{#if: {{{example|}}} |


===Example===
==Example==
<div class="template_example">{{{example|}}}</div> |}}
<div class="template_example">{{{example|}}}</div> |}}
{{#if: {{{examples|}}} |
{{#if: {{{examples|}}} |


===Examples===
==Examples==
<div class="template_examples">{{{examples|}}}</div> |}}
<div class="template_examples">{{{examples|}}}</div> |}}
{{#if: {{{equivmacro|}}} |
==Equivalents==
<div class="template_also">{{{equivmacro|}}}</div> |}}
{{#if: {{{also|}}} |
{{#if: {{{also|}}} |
===See Also===
==See Also==
<div class="template_also">{{{also|}}}</div> |}}
<div class="template_also">{{{also|}}}</div> |}}
{{#if: {{{changes|}}} |
{{#if: {{{changes|}}} |
===Version Changes===
==Version Changes==
<div class="template_changes">
<div class="template_changes">
{{{changes|}}}
{{{changes|}}}
</div> |}}
</div> |}}
<includeonly>[[Category:Macro Function]]__NOEDITSECTION__</includeonly>
[[Category:Macro Function]][[Category:Special Variable]]__NOEDITSECTION__</includeonly>
<noinclude>[[Category:Templates]]</noinclude>
<noinclude>[[Category:Templates]]</noinclude>

Latest revision as of 23:33, 21 June 2021

Template Usage

You should always write the description as though the words "This special variable..." are automatically supplied by the template.

Refer to Help:Editing for more detailed documentation.

Example

{{SpecialVariable
|name=example.specialvar
|proposed=true
|deprecated=[[newFunction|newFunction()]]
|version=1.5.0
|compatibility=1.9.0
|description=Refers to some MapTool internal data for quick access in Macros. This example of course doesn't refer to any real special variable, but it will when you use this template! "&nbsp;"
{{__TOC__}}
|usage=
<source lang="mtmacro" line>
[r: example.specialvar]
</source>

|example=
This example doesn't really do anything.
<source lang="mtmacro" line>
[r: example.specialvar)]
</source>
Returns:
<source lang="mtmacro" line>
DA74EB9CAA9B47C9970FFC45DB259949
</source>

|macroequiv=
[[equivFunction|equivFunction()]]

|also=
[[linkToRelatedArticle|Display Name of Related Article]]

|changes=
* '''1.5.5''' - Correctly trims output.
}}

Source

Edit this section to view template source.