Difference between revisions of "Template:Aligned table/doc"
blackwiki>Frietjes (→Examples: will work on this later) |
blackwiki>SpikeToronto (→Parameters: Required for tablets (e.g., iPad).) |
||
| Line 44: | Line 44: | ||
== Parameters == | == Parameters == | ||
| − | + | <div style="overflow:auto;"> | |
{{Aligned table | {{Aligned table | ||
|cols=4 |class=wikitable |style=line-height:1.35em; | |cols=4 |class=wikitable |style=line-height:1.35em; | ||
| Line 163: | Line 163: | ||
| <code>{{!}} Azerbaijan {{!}} Malta {{!}} Zaire</code> | | <code>{{!}} Azerbaijan {{!}} Malta {{!}} Zaire</code> | ||
| ''Not set'' | | ''Not set'' | ||
| − | }} | + | }}</div> |
== Examples == | == Examples == | ||
Revision as of 10:46, 17 January 2017
| This is a documentation subpage for Template:Aligned table. It contains usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
| This template is used on 9,400+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Transclusion count updated automatically (see documentation). |
The purpose is of this template is for generating simple tables in locations where standard table markup is either not possible, without significant use of the {{!}} magic word (e.g., with a {{sidebar}} template), or cumbersome (due to the repetitive use of specification of the same style statement in each row). This template should not be used to replace standard table markup in articles. This template is meant to be complimentary to {{infobox}} or {{sidebar}}, and not a replacement for {{infobox}} or {{sidebar}}.
A simpler method to include a table in a template that does not directly support table markup is to create the table in a sub-template using standard markup and transclude it.
Full syntax
For parameter explanations, see table below.
{{Aligned table
| cols =
| fullwidth =
| class =
| style =
| colwidth =
| leftright =
| colstyle =
| rowstyle =
<!--for Cth column:-->
| colCwidth =
| colCclass =
| colCalign =
| colCstyle =
| colCnowrap =
<!--for Rth row:-->
| rowRclass =
| rowRstyle =
| rowRheader =
<!--for cell R,C:-->
| classR.C =
| styleR.C =
| (cell 1,1) | (cell 1,2) | ... | ...
| (cell 2,1) | (cell 2,2) | ... | ...
}}
Parameters
Examples
{{Aligned table
|cols=3 |class=wikitable
| A | 1 | a
| B | 2 | b
}}
Script error: No such module "aligned table".
{{Aligned table
|cols=4 |class=wikitable
|col1align=center |col2align=center
|col3align=right |col4align=right
| AAA | aa | 123 | 12345
| B | bbbbb | 1234 | 2
}}
Script error: No such module "aligned table".
{{Aligned table
|class=wikitable |style=width:20em;
|col1align=center |col2align=right
| AAA | 123
| B | 2
}}
Script error: No such module "aligned table".
{{Aligned table
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
}}
Script error: No such module "aligned table".
{{Aligned table
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
| | |
| C | 3 | c
}}
Script error: No such module "aligned table".