Template:Block: Difference between revisions

m
m (Protected "Template:Block": Template is used in hundreds of pages. ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
m (Migrate to Template:Documentation)
 
Line 27: Line 27:
#if:{{{output4|}}}|{{{output4}}}<br />}}{{
#if:{{{output4|}}}|{{{output4}}}<br />}}{{
#if:{{{output5|}}}|{{{output5}}}<br />}}
#if:{{{output5|}}}|{{{output5}}}<br />}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>{{Documentation}}</noinclude>
The '''Block''' template is an [[Template:Infobox|infobox]] for blocks, primarily [[script block]]s.
 
== Example ==
 
{{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
}}
 
The example is generated via the following:
 
<pre>
{{Block
|title=Absolute
|image=Absolute.png
|type=s
|folder=math
|input1={{Port|n}}
|output1={{Port|n}}
}}
</pre>
----
<pre>
{{Block
|title=Box
|image=Box.png
|type=n
|collider=b
|folder=Templates
}}
</pre>
 
== 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.
** '''p'''hysics
** '''s'''cript block
* '''collider''': First letter of the [[collider]] of block in lowercase. If unspecified, defaults to normal. There are two options.
** '''b'''ox
** '''s'''phere
* '''folder''': The [[Editor#Inventory|folder]] the block is in.
* '''input#''': <code>#</code> for number. Supports up to five parameters. The input [[Template:Port|port]]s of the block, from left to right, top to bottom.
* '''output#''': <code>#</code> for number. Supports up to five parameters. The output ports of the block, from left to right, top to bottom.
[[Category:Infoboxes]]
</noinclude>