Difference between revisions of "Template:Sawtooth"

From LifeWiki
Jump to navigation Jump to search
m
(Use Template:PatternPopulationAndBoundingBox; group "generic" parameters at top of infobox)
Line 14: Line 14:
 
<tr>
 
<tr>
 
<th> Pattern type </th>
 
<th> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Sawtooth]] </td></tr>
+
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Sawtooth]] </td></tr><!--
<tr>
+
 
<th> Number of [[cell]]s </th>
+
Display population and bounding box. Passing catextra= ensures we also get conduit-specific categories, e.g. "Conduits with ... cells".
<td> {{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[:Category:Patterns with 1000 or more cells|{{{c}}}]] | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] }} | Unknown }} </td></tr>
+
 
<tr>
+
-->{{PatternPopulationAndBoundingBox
<th> [[Bounding box]] </th>
+
|c        = {{{c|}}}
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
+
|bx      = {{{bx|}}}
 +
|by      = {{{by|}}}
 +
|catextra = Sawtooths
 +
}}<!--
 +
 
 +
Display an infobox divider
 +
 
 +
-->{{InfoboxDivider}}
 
<tr>
 
<tr>
 
<th> [[Expansion factor]] </th>
 
<th> [[Expansion factor]] </th>
Line 81: Line 88:
 
[[Category:Sawtooths]]
 
[[Category:Sawtooths]]
 
{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
 
{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Sawtooths with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Sawtooths with {{{c}}} cells]] }} }} }}{{#if: {{{e|}}} | {{#ifeq: {{{e|}}} | n/a | [[Category:Sawtooths with no expansion factor]] | {{#iferror: {{#expr: floor({{{e}}})}} | | [[Category:Sawtooths with expansion factor {{#expr: floor({{{e}}})}}]] }} }} }}
+
{{#if: {{{e|}}} | {{#ifeq: {{{e|}}} | n/a | [[Category:Sawtooths with no expansion factor]] | {{#iferror: {{#expr: floor({{{e}}})}} | | [[Category:Sawtooths with expansion factor {{#expr: floor({{{e}}})}}]] }} }} }}
 
</includeonly>
 
</includeonly>

Revision as of 20:50, 18 February 2018

Sawtooth Name
{{{name}}} image
Pattern type Sawtooth
Expansion factor Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for sawtooths. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Style guide/Pattern layout. To see a live example of this template in action, see Cord puller.

Special parameters

The following parameter is optional and should only be specified if it is relevant.

  • e: the expansion factor of the sawtooth (e.g. e=11). For sawtooths with no expansion factor in the usual sense, specify e=n/a.

Pattern templates