Difference between revisions of "Template:Variable"

From FreeCAD Documentation
Jump to navigation Jump to search
(Added third parameter to show a second Type of the variable, in parentheses, and using the {{incode}} template for code. Also changed the size, to be relative, instead of fixed.)
(First type is 60%, and the second type is 80% in size.)
Line 1: Line 1:
 
{{#if:{{{2|}}}
 
{{#if:{{{2|}}}
     |<span style="font-size:67%; padding-right:10px;">{{{2}}}</span>
+
     |<span style="font-size:60%; padding-right:10px;">{{{2}}}</span>
 
     |}}'''{{{1}}}'''{{#if:{{{3|}}}
 
     |}}'''{{{1}}}'''{{#if:{{{3|}}}
 
                       |<span style="font-size:80%;"> ({{incode|{{{3}}}}})</span>
 
                       |<span style="font-size:80%;"> ({{incode|{{{3}}}}})</span>

Revision as of 05:20, 19 December 2019

{{{1}}}


Use this template where you want to show a value or parameter.

Example:

{{Variable|MyAttribute}}: some variable.

Result:

MyAttribute: some variable.


You can optionally also specify a type to be shown before the variable.

Example:

{{Variable|MyAttribute|Type}}: some variable.

Result:

TypeMyAttribute: some variable.


You can optionally also specify a second type to be shown after the variable.

{{Variable|MyAttribute|Type|Type2}}: some variable.

Result:

TypeMyAttribute (Type2): some variable.