Difference between revisions of "Template:Shops/TableRow"
(Created Template:Shops/TableRow) |
m (Removed unnecessary space) |
||
Line 13: | Line 13: | ||
There are mandatory parameters for this template which '''must''' be used when inserting it: | There are mandatory parameters for this template which '''must''' be used when inserting it: | ||
<nowiki>{{Shops/TableRow | <nowiki>{{Shops/TableRow | ||
− | | ItemData | + | | ItemData = Defaults to "" if left blank , otherwise as per editor input |
− | | CostData | + | | CostData = Defaults to "" if left blank , otherwise as per editor input |
− | | RequirementData | + | | RequirementData = Defaults to "" if left blank , otherwise as per editor input |
− | | RefundData | + | | RefundData = Defaults to "" if left blank , otherwise as per editor input |
}}</nowiki> | }}</nowiki> | ||
The various '''<code><nowiki>***Data</nowiki></code>''' parameters determine the cell content in the row. | The various '''<code><nowiki>***Data</nowiki></code>''' parameters determine the cell content in the row. | ||
Line 22: | Line 22: | ||
The following parameters '''will''' get used when wanting a 5-column row (the default is a 4-column row): | The following parameters '''will''' get used when wanting a 5-column row (the default is a 4-column row): | ||
<nowiki>{{Shops/TableRow | <nowiki>{{Shops/TableRow | ||
− | | NoteColumn | + | | NoteColumn = Defaults to "" if left blank (no column), otherwise input "Yes" for the Note column to appear |
− | | NoteData | + | | NoteData = Defaults to "" if left blank , otherwise as per editor input |
}}</nowiki> | }}</nowiki> | ||
The '''<code><nowiki>NoteColumn</nowiki></code>''' parameter is the toggle used for adding the 5th column. Note that the input '''must''' be '''Yes''', not yes or anything else.<br> | The '''<code><nowiki>NoteColumn</nowiki></code>''' parameter is the toggle used for adding the 5th column. Note that the input '''must''' be '''Yes''', not yes or anything else.<br> | ||
Line 30: | Line 30: | ||
Optional parameters for this template include: | Optional parameters for this template include: | ||
<nowiki>{{ShopsTableRow | <nowiki>{{ShopsTableRow | ||
− | | vAlignCenter | + | | vAlignCenter = Defaults to "top" if left blank , otherwise input "Yes" for "center" |
− | | ItemAlignCenter | + | | ItemAlignCenter = Defaults to "left" if left blank , otherwise input "Yes" for "center" |
− | | NoteAlignLeft | + | | NoteAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" |
− | | CostAlignLeft | + | | CostAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" |
− | | RequirementAlignLeft | + | | RequirementAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" |
− | | RefundAlignLeft | + | | RefundAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" |
}}</nowiki> | }}</nowiki> | ||
Should any of them be used very often, it may suggest that a revision to the base template is needed. Please submit a proposal to the other editors and decide if this change should be made.<br> | Should any of them be used very often, it may suggest that a revision to the base template is needed. Please submit a proposal to the other editors and decide if this change should be made.<br> |
Revision as of 21:35, 22 March 2022
In order to use this template, insert {{Shops/TableRow}}
, with the mandatory parameters stated below.
Please note that sole usage of this {{Shops/TableRow}}
template is not sufficient for generating a full table.
This template itself is not used directly: instead, {{Shops/TableRow/XXX}}
templates where XXX represents a shop item are created using this template, with those then being used directly.
{{Shops/TableRow/XXX}}
templates must be placed after the {{Shops/TableHeader}}
template.
{{Shops/TableRow/XXX}}
templates must be placed before a </table>
tag (NOT |}
!).
A mockup of a full table is shown below:
{{Shops/TableHeader}}
{{Shops/TableRow/ABC}}
{{Shops/TableRow/XYZ}}
</table>
There are mandatory parameters for this template which must be used when inserting it:
{{Shops/TableRow | ItemData = Defaults to "" if left blank , otherwise as per editor input | CostData = Defaults to "" if left blank , otherwise as per editor input | RequirementData = Defaults to "" if left blank , otherwise as per editor input | RefundData = Defaults to "" if left blank , otherwise as per editor input }}
The various ***Data
parameters determine the cell content in the row.
The following parameters will get used when wanting a 5-column row (the default is a 4-column row):
{{Shops/TableRow | NoteColumn = Defaults to "" if left blank (no column), otherwise input "Yes" for the Note column to appear | NoteData = Defaults to "" if left blank , otherwise as per editor input }}
The NoteColumn
parameter is the toggle used for adding the 5th column. Note that the input must be Yes, not yes or anything else.
The NoteData
parameter determines the cell content in the 5th column.
Optional parameters for this template include:
{{ShopsTableRow | vAlignCenter = Defaults to "top" if left blank , otherwise input "Yes" for "center" | ItemAlignCenter = Defaults to "left" if left blank , otherwise input "Yes" for "center" | NoteAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" | CostAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" | RequirementAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" | RefundAlignLeft = Defaults to "center" if left blank , otherwise input "Yes" for "left" }}
Should any of them be used very often, it may suggest that a revision to the base template is needed. Please submit a proposal to the other editors and decide if this change should be made.
DO NOT edit the base template unilaterally as this may cause the transclusion to break down.
For easy reference, the code transcluded by the template is:
<tr style="vertical-align: {{ifeq|{{{vAlignCenter|}}}|Yes|center|top}}"> <td style="text-align: {{ifeq|{{{ItemAlignCenter|}}}|Yes|center|left}}">{{{ItemData|}}}</td> {{ifeq|1={{{NoteColumn|}}}|2=Yes|3=<td style="text-align: {{ifeq|{{{NoteAlignLeft|}}}|Yes|left|center}}">{{{NoteData|}}}</td>|4=}} <td style="text-align: {{ifeq|{{{CostAlignLeft|}}}|Yes|left|center}}">{{{CostData|}}}</td> <td style="text-align: {{ifeq|{{{RequirementAlignLeft|}}}|Yes|left|center}}">{{{RequirementData|}}}</td> <td style="text-align: {{ifeq|{{{RefundAlignLeft|}}}|Yes|left|center}}">{{{RefundData|}}}</td> </tr>