Jump to content

Template:Row with notes

From Consumer Rights Wiki

Note from page creator: everything below here is basically raw AI output, but it seems to work

This template adds one row to a table, with up to 12 cells, followed by a full-width notes row. It's useful when one column would hold long text that makes every row very tall.

The notes row has the class expand-child, so it stays attached to its row when a sortable table is sorted. If notes is left empty, the notes row is hidden.

Usage

Put one call per row inside a normal wikitable, after the header row:

{| class="wikitable sortable"
! Name !! Date !! Amount
{{Row with notes
| 1 = First cell
| 2 = Second cell
| 3 = Third cell
| notes = Long text shown in a full-width row underneath.
}}
|}

Parameters

Parameter Description
1 to 12 Cell contents, left to right. The number of cells used sets the width of the notes row.
notes Text for the full-width row. Bullet lists work here.
header Set to yes to make the first cell a row header, which makes each entry easier to spot.
sort1 to sort12 Sort value for that cell (for example sort4 = 498500 for a cell that shows "$498,500").
cols Width of the notes row, in columns. Only needed if the table has more columns than this row has cells.

Tips:

  • Write cells as 1 =, 2 =, and so on. This trims stray spaces and lets a cell contain an equals sign (for example a URL with a query string).
  • Leave a cell empty with | 3 =, but don't skip the number, or the notes row will be the wrong width.
  • Cells 2 to 12 are placed on a single line, so they can't start with a bullet list. Put lists in notes instead.
  • Need more than 12 columns? Copy the last #ifeq block on the cells line and the last #ifeq in the #expr, and change the number.
  • Every row in a sortable table should use this template. Otherwise, notes will come loose from their rows when sorted.

Example

Fruit Colour Price
Apple Red $1.20

Try sorting by any column: this row stays attached to the Apple row.

Banana Yellow $0.50

Credit

The layout is based on the ShortSummary row of Wikipedia's Template:Episode list. No code was copied; this is a simplified version written from scratch.