Template:Expandable table: Difference between revisions
Jump to navigation
Jump to search
Created page with "<includeonly><table class="wikitable mw-collapsible mw-collapsed wizlords-magic-table wizlords-example-table {{{class|}}}"> <caption>{{{caption}}}</caption> {{{content}}} </table></includeonly><noinclude> == About this template == Creates a table that initially loads collapsed and can be expanded by selecting its caption. On phone and tablet, the caption also works as the accessible JavaScript-controlled toggle. The template keeps the existing <code>wizlords-example-tab..." |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><table class="wikitable mw-collapsible mw-collapsed wizlords-magic-table wizlords-example-table {{{class|}}}"> | <includeonly><table class="wikitable mw-collapsible mw-collapsed wizlords-magic-table wizlords-example-table {{{class|}}}"> | ||
<caption>{{{caption}}}</caption> | <caption>{{{caption}}} </caption> | ||
{{{content}}} | {{{content}}} | ||
</table></includeonly><noinclude> | </table></includeonly><noinclude> | ||
Latest revision as of 04:31, 16 July 2026
About this template
[edit]Creates a table that initially loads collapsed and can be expanded by selecting its caption. On phone and tablet, the caption also works as the accessible JavaScript-controlled toggle.
The template keeps the existing wizlords-example-table class required by the site JavaScript. Use HTML table rows inside content so wiki-table pipe characters do not interfere with template parameters.
Parameters
[edit]caption- title displayed above the table and used as the expandable control.class- optional existing modifier classes, such aswizlords-example-table-full-healorwizlords-reputation-table.content- table header and data rows written withtr,th, andtdelements.
Basic example
[edit]{{Expandable table
|caption=Example: Arcane Bolt
|content=
<tr>
<th>Spell Level</th>
<th>Spell Point Cost</th>
</tr>
<tr>
<td>Level 1</td>
<td>1 Spell Point</td>
</tr>
}}
Keep the caption and generated table classes unchanged because CSS, keyboard behavior, and JavaScript depend on them.