Template:Table: Difference between revisions
From Qix Wiki
Jump to navigationJump to search
Trig Jegman (talk | contribs) mNo edit summary |
m 13 revisions imported |
||
| (3 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:Table/styles.css" /> | <includeonly><templatestyles src="Template:Table/styles.css" /> | ||
{| class="t_nav" | {| class="t_nav {{#switch:{{{collapsible|}}}|true|collapsible=mw-collapsible|collapsed=mw-collapsible mw-collapsed|#default=}}" style="min-width:300px;" | ||
! class="t_nav_title" colspan="2" | {{{title|}}} | ! class="t_nav_title" colspan="2" | {{{title|}}} | ||
|- | |- | ||
| Line 259: | Line 259: | ||
This template is called by other templates to format tables. Do not use it directly on content pages. | This template is called by other templates to format tables. Do not use it directly on content pages. | ||
Example: | |||
{{Table | |||
|title=Example Table 1 | |||
|group1=Left column box 1 | |||
|list1=Right column box 1 | |||
|group2=Left column box 2 | |||
|list2=Right column box 2 | |||
}} | |||
<br clear=all> | |||
More complicated example: | |||
{{Table | |||
|title=Example Table 2 | |||
|collapsible=collapsible | |||
|style1=background-color: #AE5EDA; | |||
|group1=Left column box 1 is now purple | |||
|list1=Right column box 1 | |||
|group2=Left column box 2 | |||
|list2=Also, this table is collapsible | |||
}} | |||
Collapsed by default: | |||
{{Table | |||
|title=Example Table 2 | |||
|collapsible=collapsed | |||
|style1=background-color: #AE5EDA; | |||
|group1=Left column box 1 is still purple | |||
|list1=Right column box 1 | |||
|style2=background-color:#55F211; color:#000000 | |||
|group2=Left column box 2 is now different too | |||
|list2=Now it is closed initially! | |||
}} | |||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> | ||
Latest revision as of 02:14, 4 May 2026
See also: Template:Table/styles.css.
This template is called by other templates to format tables. Do not use it directly on content pages.
Example:
| Example Table 1 | |
|---|---|
| Left column box 1 |
Right column box 1 |
| Left column box 2 |
Right column box 2 |
More complicated example:
| Example Table 2 | |
|---|---|
| Left column box 1 is now purple |
Right column box 1 |
| Left column box 2 |
Also, this table is collapsible |
Collapsed by default:
| Example Table 2 | |
|---|---|
| Left column box 1 is still purple |
Right column box 1 |
| Left column box 2 is now different too |
Now it is closed initially! |