Difference between revisions of "Template:Ask Table Formatter/doc"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== Parameters == | == Parameters == | ||
This template does not use traditional template parameters, instead it is fed up to 10 parameters to display by the #ask itself. Further, up to three ratios can be defined to be displayed as the final columns in the table be defining the following wiki variables | This template does not use traditional template parameters, instead it is fed up to 10 parameters to display by the #ask itself. Further, up to three ratios can be defined to be displayed as the final columns in the table be defining the following wiki variables | ||
− | # Ratio 1 = formatterNumeratorVariable1/formatterDenominatorVariable1 | + | # Ratio 1 = formatterNumeratorVariable1 / formatterDenominatorVariable1 * formatterFactorVariable1 |
− | # Ratio 2 = formatterNumeratorVariable2/formatterDenominatorVariable2 | + | # Ratio 2 = formatterNumeratorVariable2 / formatterDenominatorVariable2 * formatterFactorVariable2 |
− | # Ratio 3 = formatterNumeratorVariable3/formatterDenominatorVariable3 | + | # Ratio 3 = formatterNumeratorVariable3 / formatterDenominatorVariable3 * formatterFactorVariable3 |
Keep in mind the whitespace created when defining these variables on new lines. | Keep in mind the whitespace created when defining these variables on new lines. | ||
Revision as of 13:26, 20 December 2023
This template allows any table created by the "#ask" to use the Template: STDT formatting properly, including the shaded first cell.
Parameters
This template does not use traditional template parameters, instead it is fed up to 10 parameters to display by the #ask itself. Further, up to three ratios can be defined to be displayed as the final columns in the table be defining the following wiki variables
- Ratio 1 = formatterNumeratorVariable1 / formatterDenominatorVariable1 * formatterFactorVariable1
- Ratio 2 = formatterNumeratorVariable2 / formatterDenominatorVariable2 * formatterFactorVariable2
- Ratio 3 = formatterNumeratorVariable3 / formatterDenominatorVariable3 * formatterFactorVariable3
Keep in mind the whitespace created when defining these variables on new lines.
Note: the #ask must also use the | link = none
parameter.
Examples
Example 1 - Basic
<div><li style="display: inline-table;"> {| {{STDT| sortable c_08 text-center}} ! Insectoid !! Meat Amount |- {{#ask: [[Category:Insectoid]] | ?Meat Yield | format = template | template = Ask Table Formatter | link = none }} </li></div>
Produces:
Insectoid | Meat Amount |
---|---|
Megascarab | 31 |
Megascarab cocoon | |
Megaspider | 168 |
Megaspider cocoon | |
Spelopede | 112 |
Spelopede cocoon |
Example 2 - Ratios
Produces: