साँचा:Alternating rows table section/doc
{{
साँचा:namespace detect
| type = notice
| image =
| imageright =
| class =
| style = margin-bottom:1.0em;
| textstyle =
| text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
Usage
Alternating rows table section allows for the dynamic creation of tables that use alternating styles for odd and even numbered rows, typically in conjunction with a template which generates a table where some rows may not be present every time.
The template produces only a portion of the table: this allows for the end user to customize the leading and trailing sections of the table, include secondary rows between sections, or other control elements. This table creates a new row at the start, and the user must start a new row if they want to include additional information after the table section.
There are two named arguments to this template:
- os
- Defines the CSS style for odd-numbered rows.
- es
- Defines the CSS style for even-numbered rows.
Beyond these, the template accepts up to 30 unnamed parameters, the contents which are appropriate wikimarkup to create a table row as described below. A parameter may be left empty, and will not add to the current row count; in other words, the template tracks how may rows have been defined by the unnamed arguments to determine to apply the odd or even styling.
The unnamed arguments must start with a template-compatible table cell symbol, either "!" for a header, or the use of साँचा:tl to create the standard cell indicator "|". An argument can contain multiple cells, either separated on lines (using साँचा:tl to separate cells) or on a single line (using साँचा:tl to replace "||" delimiters); cell-specific style arguments can also be applied.
Unpredictable results may happen using other wikitable features such as rowspanning, creating a new row within an argument (using साँचा:tl), or the like.
Examples
{| class="wikitable" ! Place !! Result {{Alternating rows table section|es=background:#f0f0f0; | {{!}} First {{!!}} 100 | {{!}} Second {{!!}} 95 | <!-- empty! --> | {{!}} Third {{!!}} 87 | <!-- empty! --> | {{!}} Fourth {{!!}} 65 | {{!}} Fifth {{!!}} 58 }} |}
Place | Result | ||||
---|---|---|---|---|---|
First | 100 | ||||
Second | 95
साँचा:void|- style="" |
Third | 87
साँचा:void|- style="background:#f0f0f0;" |
Fourth | 65 |
Fifth | 58
साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void |
{| class="infobox vevent" style="float:left;" ! colspan="2" style="background:#4040F0;" | AFC North {{Alternating rows table section|es=background:#f0f0f0; | {{!}} Ravens {{!!}} Baltimore | {{!}} Bengals {{!!}} Cincinnati | {{!}} Browns {{!!}} Cleveland | <!-- Empty! --> | {{!}} Steelers {{!!}} Pittsburgh }} |- ! colspan="2" style="background:#4040F0;" | AFC East {{Alternating rows table section|es=background:#f0f0f0; | {{!}} Bills {{!!}} Buffalo | {{!}} Dolphins {{!!}} Miami | <!-- empty! --> | {{!}} Patroits {{!!}} New England | {{!}} Jets {{!!}} New York }} |}
AFC North | |||
---|---|---|---|
Ravens | Baltimore | ||
Bengals | Cincinnati | ||
Browns | Cleveland
साँचा:void|- style="background:#f0f0f0;" |
Steelers | Pittsburgh
साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void |
AFC East | |||
Bills | Buffalo | ||
Dolphins | Miami
साँचा:void|- style="" |
Patroits | New England |
Jets | New York
साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void साँचा:void |