Template:GenericSortable/doc: Difference between revisions
Jump to navigation
Jump to search
Created blank page |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=How to use this Template= | |||
==Syntax== | |||
To make an entry for a generic SORTABLE table, use the Template call <pre>{{GenericSortable}}</pre> | |||
Inside of the template you'll enter parameters to fill in the template with the appropriate information. | |||
==GenericSortable Template Variables== | |||
* '''columns''' - Number of columns in the table (default: 3) | |||
* '''tableStyle=text-align:{n}''' - Alignment for the whole table | |||
* '''row{n}cell{n}style=text-align:{n}''' - Alignment of a specific row/cell | |||
* '''heading{n}''' - Text for each column header | |||
* '''heading{n}colspan''' - Colspan attribute (if needed) | |||
* '''row{n}cell{n}''' - Content for each cell in each row | |||
===Example=== | |||
Below is an example of the syntax, and the resulting table that is created. | |||
<pre> | |||
{{GenericSortable | |||
|tableStyle=text-align:left | |||
|columns=3 | |||
|heading1=I | |||
|heading2=Love | |||
|heading3=August! | |||
|row1cell1=Yes | |||
|row1cell2=I | |||
|row1cell3=Do! | |||
}} | |||
</pre> | |||
{{GenericSortable | |||
|tableStyle=text-align:left | |||
|columns=3 | |||
|heading1=I | |||
|heading2=Love | |||
|heading3=August! | |||
|row1cell1=Yes | |||
|row1cell2=I | |||
|row1cell3=Do! | |||
}} | |||
[[Category:Templates]] |
Latest revision as of 02:50, 16 March 2025
How to use this Template
Syntax
To make an entry for a generic SORTABLE table, use the Template call
{{GenericSortable}}
Inside of the template you'll enter parameters to fill in the template with the appropriate information.
GenericSortable Template Variables
- columns - Number of columns in the table (default: 3)
- tableStyle=text-align:{n} - Alignment for the whole table
- row{n}cell{n}style=text-align:{n} - Alignment of a specific row/cell
- heading{n} - Text for each column header
- heading{n}colspan - Colspan attribute (if needed)
- row{n}cell{n} - Content for each cell in each row
Example
Below is an example of the syntax, and the resulting table that is created.
{{GenericSortable |tableStyle=text-align:left |columns=3 |heading1=I |heading2=Love |heading3=August! |row1cell1=Yes |row1cell2=I |row1cell3=Do! }}
I | Love | August! |
---|---|---|
Yes | I | Do! |