Template:Infobox challenge/gridRow: Difference between revisions

From He is Coming Official Wiki
Aww yeah! Parameterized row of adjacent challenge gridCells.
Brought it all together in an even more concise form.
Line 1: Line 1:
<includeonly>| style="height: 30px;" | {{#ifeq: {{{middle_index|no}}} | no | | {{Infobox challenge/gridCell|red|{{{region}}}|{{#expr:{{{middle_index}}} - 1}}}}
<includeonly>| style="height: 30px;" | {{#ifexpr: {{{1|65}}} < 65 | {{#ifexpr: {{{1}}} mod 13 > 0 | {{../gridCell|red|{{{region}}}|{{#expr:{{{1}}} - 1}}}}}}
   {{!}} colspan="3" {{!}} {{Infobox challenge/gridCell|arrow_{{{arrow}}}|{{{region}}}|{{{middle_index}}}}}
   {{!}} colspan="3" style="text-align:center;" {{!}} {{Infobox challenge/gridCell|arrow_{{{arrow}}}|{{{region}}}|{{{1}}}}}
   {{!}} {{!}} {{Infobox challenge/gridCell|red|{{{region}}}|{{#expr:{{{middle_index}}} + 1}}}}
   {{!}} {{!}} {{#ifexpr: {{{1}}} mod 13 < 12 | {{../gridCell|red|{{{region}}}|{{#expr:{{{1}}} + 1}}}}}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{|
{|
|-
|-
{{../gridRow
{{../gridRow | arrow = down | region = Woodland | 1}}
  | middle_index = 1
  | arrow = down
  | region = Woodland}}
|-
|-
{{../gridRow
{{../gridRow}}
  | region = Woodland}}
|-
|-
{{../gridRow
{{../gridRow | arrow = up | region = Swampland | 27}}
  | middle_index = 27
  | arrow = up
  | region = Swampland}}
|}
|}
==Parameters==
==Parameters==
* arrow = direction the inset arrow of the grid-image points, part of its filename: {down, up}
* arrow = direction the inset arrow of the grid-image points, part of its filename: {down, up}
* middle_index = Of the up-to three grid squares shown, what is the number that identifies the second one?
* region = Supplies part of the pagename that will be prepended to indexes; e.g.: Woodland
* region = Supplies part of the pagename that will be prepended to indexes; e.g.: Woodland
# formerly "middle_index" = Of the up-to three grid squares shown, what is the number that identifies the second one?  Leaving this blank or setting it higher than 64 causes the row to be empty.
</noinclude>
</noinclude>

Revision as of 02:56, 29 August 2025

Parameters

  • arrow = direction the inset arrow of the grid-image points, part of its filename: {down, up}
  • region = Supplies part of the pagename that will be prepended to indexes; e.g.: Woodland
  1. formerly "middle_index" = Of the up-to three grid squares shown, what is the number that identifies the second one? Leaving this blank or setting it higher than 64 causes the row to be empty.