> For the complete documentation index, see [llms.txt](https://docs.dbnetsoft.com/dbnetsoft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnetsoft.com/dbnetsoft/scory/expressions/list-header-footer-and-images.md).

# List header, footer and images

A list's header and footer boxes, a second line and a bar in a column, logos, sponsors and flags, and text in German and English.

Besides its columns, a list can carry information boxes above and below the rows, a second line or a bar in any column, images anywhere text goes, and text in several languages. All of it is written with [expressions and templates](https://docs.dbnetsoft.com/dbnetsoft/scory/expressions.md). The HTML view, MyScory and the PDF show it the same way.

## Header and footer

**Lists → a list → Header and footer.** The header is shown under the title (in the PDF on the first page), the footer after the rows. Both are templates, like the title: `{{ ... }}` is replaced by its value, and loops and conditions work.

The text becomes boxes:

| Line                   | Becomes                                                                     |
| ---------------------- | --------------------------------------------------------------------------- |
| `## Jury`              | a box with this heading                                                     |
| `### Forerunners`      | a box across both columns                                                   |
| `\| label \| value \|` | a row in the box: the label left, the value right; more cells, more columns |
| `\|---\|---\|`         | under a row: that row is the table's header                                 |
| any other line         | text                                                                        |

The boxes stand in two columns. **A row without a value is left out**, and so is a box with no rows left - so a box can list every possible entry, and only the ones filled in show:

```
## Jury
| Technical Delegate | {{ competition.fields.td }} |
| Referee | {{ competition.fields.referee }} |
| Chief of Race | {{ competition.fields.chiefOfRace }} |

## Technical data
| Course | {{ competition.runs[0].track?.name }} |
| Length | {{ competition.runs[0].track?.length }} m |

### Timing and data processing
| Timing | {{ competition.fields.timingBy }} |
```

The editor has two views (per browser): **Visual** - a line each as a box, a box across, a row of cells, a headings line, text or a blank line; loops and conditions stay as script lines - and **Source**, the text itself. Fields picked from the list go into the cell that has the focus.

The header and footer see the same names as the title: `event`, `competition`, `heat`, `class`, `competitions`, `classes`, `language`, `now` - see [Fields → List and page](https://docs.dbnetsoft.com/dbnetsoft/scory/expressions/fields.md#list-and-page).

## A second line in a column

**Lists → Columns → ⋯ → Second line**: an expression or template per row, shown under the cell's value, smaller and in grey. The club and year of birth under the name:

```
{{ club }}   {{ yob }}
```

In the PDF a row gets two lines as soon as one column has a second line.

## A bar in a column

**Lists → Columns → ⋯ → Bar**: a number per row. Within each group of the list the smallest number gets no bar and the largest a full one; the cell's text stands under the bar. With `timeValue` the bar shows the gap to the group's winner.

## Images

**Setup → Event → Assets** (images and fonts): upload PNG, JPEG or WebP files (up to 2 MB each; a WebP is turned into a PNG) and give each a key - lower-case letters, digits, `-` and `_`, e.g. `logo` or `sponsor-1`. Replacing an image keeps its key, so every list showing it shows the new one.

An image goes wherever text goes: in a column, a second line, the title and sub title, a group header, the header and footer boxes, a column header and the PDF's page header and footer cells.

| You write                        | Shows                                                  |
| -------------------------------- | ------------------------------------------------------ |
| `{{ image "logo" }}`             | the image, as tall as the line                         |
| `{{ image "logo" 40 }}`          | 40 points tall (the width follows)                     |
| `{{ image "logo" "20mm" }}`      | 20 mm tall - also `"2cm"`, `"48px"`, `"30pt"`, `"1in"` |
| `flag(nation)` (expression)      | the athlete's flag                                     |
| `{{ flag nation }} {{ nation }}` | the flag before the nation code                        |
| `{{ image "flag:AUT" }}`         | one nation's flag                                      |

* A height without a unit is in points (1/72 inch); `px` is a screen pixel as in CSS (0.75 pt).
* In a list row an image is at most as tall as the line; in the PDF's page header and footer cells and in the header / footer boxes a larger height makes the line taller - room for a logo.
* Flags come with Scory, by the three-letter nation code (`AUT`, `GER`, `SUI`, ...). An unknown code shows nothing.
* An image the event does not have is left out. CSV exports leave images out.
* The images belong to the event: they go with it to and from the cloud and show on MyScory.

A sponsor line as the PDF's page footer (Setup → Event → Lists / PDF, page frame Simple, footer centre):

```
{{ image "sponsor-1" "12mm" }}   {{ image "sponsor-2" "12mm" }}
```

## Text in German and English

A list is made in its own language (Lists → the list → Language) or, without one, in the viewer's. The name `language` gives it (`"de"` or `"en"`).

* `translate("Rank")` gives a Scory text in the list's language ("Rang" in German). The built-in templates write their column headers so: `{{ translate "Rank" }}`.
* Text in several languages, `{en:Rank|de:Rang}`, gives the list's language - in titles, column headers, group headers, cells and the header and footer.
* **Setup → Event → Translations**: your own words (text, German, English); `translate` uses them first.
* A column header with `{{ }}` is a template: `{{ translate "Time" }}`.
