Difference between revisions of "Template:Aligned table/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Zyxw
(allow template to round and format usage count)
m (63 revisions imported)
 
(4 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
{{high-use|8130}}
 
{{high-use|8130}}
 
<!----Please place categories where indicated at the bottom of this page and interwikis in Wikidata---->
 
<!----Please place categories where indicated at the bottom of this page and interwikis in Wikidata---->
The purpose is of this template is for generating simple tables in locations where [[Help:Table|standard table markup]] is either not possible, without significant use of the {{tld|!}} magic word (e.g., with a {{tl|sidebar}} template), or cumbersome (due to the repetitive use of specification of the same style statement in each row). This template should <u>not</u> be used to replace [[Help:Table|standard table markup]] in articles.  This template is meant to be complimentary to {{tl|infobox}} or {{tl|sidebar}}, and <u>not</u> a replacement for {{tl|infobox}} or {{tl|sidebar}}.
+
The purpose is of this template is for generating simple tables in locations where [[Help:Table|standard table markup]] is either not possible, without significant use of the {{tlc|!}} magic word (e.g., with a {{tl|sidebar}} template), or cumbersome (due to the repetitive use of specification of the same style statement in each row). This template should <u>not</u> be used to replace [[Help:Table|standard table markup]] in articles.  This template is meant to be complementary to {{tl|infobox}} or {{tl|sidebar}}, and <u>not</u> a replacement for {{tl|infobox}} or {{tl|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.
 
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.
Line 19: Line 19:
 
| colwidth =
 
| colwidth =
 
| leftright =
 
| leftright =
 +
| rightleft =
 
| colstyle =
 
| colstyle =
 
| rowstyle =
 
| rowstyle =
Line 99: Line 100:
 
  | If set (to anything, "on", "true", "yes", etc.) is equivalent to <kbd><nowiki>|col1align=left</nowiki></kbd> and <kbd><nowiki>|col2align=right</nowiki></kbd>
 
  | If set (to anything, "on", "true", "yes", etc.) is equivalent to <kbd><nowiki>|col1align=left</nowiki></kbd> and <kbd><nowiki>|col2align=right</nowiki></kbd>
 
  | <code><nowiki> |leftright=on </nowiki></code>
 
  | <code><nowiki> |leftright=on </nowiki></code>
 +
| ''Not set''
 +
 +
| rightleft
 +
| If set (to anything, "on", "true", "yes", etc.) is equivalent to <kbd><nowiki>|col1align=right</nowiki></kbd> and <kbd><nowiki>|col2align=left</nowiki></kbd>
 +
| <code><nowiki> |rightleft=on </nowiki></code>
 
  | ''Not set''
 
  | ''Not set''
  
Line 249: Line 255:
 
| C | 3 | c
 
| C | 3 | c
 
}}
 
}}
<includeonly>{{basepage subpage|
+
<includeonly>{{Sandbox other||
| <!-- Categories below this line, please; interwikis to Wikidata. -->
 
 
[[Category:Table templates]]
 
[[Category:Table templates]]
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 11:04, 20 October 2020

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 complementary 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 =
| rightleft =
| 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

Script error: No such module "aligned table".

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".