Template:Block: Difference between revisions
(Made the folder support any lower and uppercase text) |
-u ndefined- (talk | contribs) m (Migrate to Template:Documentation) |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 7: | Line 7: | ||
|data2={{#switch:{{{collider}}}|b=Box|s=Sphere|#default=None}} | |data2={{#switch:{{{collider}}}|b=Box|s=Sphere|#default=None}} | ||
|label3={{#if:{{{folder|}}}|Folder}} | |label3={{#if:{{{folder|}}}|Folder}} | ||
|data3={{# | |data3={{#if:{{{folder|}}}|[[Editor#{{ucfirst:{{{folder}}}}}|{{ucfirst:{{{folder}}}}}]] | ||
}} | |||
|header4={{#if:{{{input1|}}} | |||
|Ports | |||
|{{#if:{{{output1|}}}|Ports}} | |||
}} | }} | ||
|label4={{#if:{{{input1|}}}|Inputs}} | |label4={{#if:{{{input1|}}}|Inputs}} | ||
|data4={{ | |data4={{ | ||
#if:{{{input1|}}}|{{{input1}}}</ | #if:{{{input1|}}}|{{{input1}}}<br />}}{{ | ||
#if:{{{input2|}}}|{{{input2}}}</ | #if:{{{input2|}}}|{{{input2}}}<br />}}{{ | ||
#if:{{{input3|}}}|{{{input3}}}</ | #if:{{{input3|}}}|{{{input3}}}<br />}}{{ | ||
#if:{{{input4|}}}|{{{input4}}}</ | #if:{{{input4|}}}|{{{input4}}}<br />}}{{ | ||
#if:{{{input5|}}}|{{{input5}}}</ | #if:{{{input5|}}}|{{{input5}}}<br />}} | ||
|label5={{#if:{{{output1|}}}|Outputs}} | |label5={{#if:{{{output1|}}}|Outputs}} | ||
|data5={{ | |data5={{ | ||
#if:{{{output1|}}}|{{{output1}}}</ | #if:{{{output1|}}}|{{{output1}}}<br />}}{{ | ||
#if:{{{output2|}}}|{{{output2}}}</ | #if:{{{output2|}}}|{{{output2}}}<br />}}{{ | ||
#if:{{{output3|}}}|{{{output3}}}</ | #if:{{{output3|}}}|{{{output3}}}<br />}}{{ | ||
#if:{{{output4|}}}|{{{output4}}}</ | #if:{{{output4|}}}|{{{output4}}}<br />}}{{ | ||
#if:{{{output5|}}}|{{{output5}}}</ | #if:{{{output5|}}}|{{{output5}}}<br />}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude>{{Documentation}}</noinclude> | ||
{{ | |||
</noinclude> | |||
Latest revision as of 06:53, 23 August 2025
Template documentation
|
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this documentation. (About template documentation) |
| Editors can experiment in this template's sandbox and test case pages. |
Description
The Block template is an infobox for blocks, primarily script blocks.
Example
Absolute
| Type | Script block |
| Collider | None |
| Folder | Math |
| Ports | |
|---|---|
| Inputs | Number |
| Outputs | Number |
Box
| Type | Normal |
| Collider | Box |
| Folder | Templates |
The example is generated via the following:
{{Block
|title=Absolute
|image=Absolute.png
|type=s
|folder=math
|input1={{Port|n}}
|output1={{Port|n}}
}}
{{Block
|title=Box
|image=Box.png
|type=n
|collider=b
|folder=Templates
}}
Parameters
Keywords:
- title: Title of block. Defaults to page name if unspecified.
- image: Image of block. Must be provided.
- type: First letter of the type of block in lowercase. If unspecified, defaults to normal. There are two options.
- physics
- script block
- collider: First letter of the collider of block in lowercase. If unspecified, defaults to normal. There are two options.
- box
- sphere
- folder: The folder the block is in.
- input#:
#for number. Supports up to five parameters. The input ports of the block, from left to right, top to bottom. - output#:
#for number. Supports up to five parameters. The output ports of the block, from left to right, top to bottom.