---
description: How templates work in Onlit, the three ways to get one, and the reading order through the guides — the library, building your own, binding data, layout and media, schedule containers, JavaScript and the examples.
---

# Templates

A template is the web page a sign renders: an `index.html` with its CSS and assets,
packaged as a ZIP. Templates live in the template library and are assigned to an event, a
room or a single item (see [How templates are assigned](../getting-started/template_assignment.md)).
A template binds to the schedule with HTML attributes — `data-field`, `data-condition`,
`data-attribute` — so the same design serves every room.

There are three ways to get a template:

<div class="grid cards" markdown>

-   **Without code**

    Point the upload dialog at a web page URL or an HLS stream, or upload a single image or
    video, and Onlit generates the template.
    [Livestream and web page templates](livestream_and_url_templates.md)

-   **Build your own**

    Start from the base template and bind your design to the schedule data.
    [Getting started with templates](getting_started.md)

-   **Edit in the app**

    Open any template in the Template Editor, preview it with real event data, check its binding
    attributes, and let the analysis report point out problems.
    [Template Editor and analysis](template_editor_analysis.md)

</div>

## Reading order

1. [Template library](template_library.md) — uploading, what the upload checks, versions,
   usage, renaming and deleting; the findings are explained on
   [What the static analysis checks](static_analysis.md).
2. [Getting started with templates](getting_started.md) — the base template, the file
   layout, the rules every template follows; then
   [Testing and troubleshooting templates](testing_troubleshooting.md).
3. **Data binding** — [Displaying JSON values](basic/json_value_configuration.md) ·
   [Binding attributes with data-attribute](basic/data_attribute_configuration.md) ·
   [Data binding reference](basic/unsupported_characters_expressions.md) ·
   [Template data fields](advanced/dynamic_fields.md) ·
   [Time formatting](advanced/render_time_formatting.md)
4. **Layout and media** — [Background and banner images](basic/layout_assets_configuration.md) ·
   [Fonts](basic/font_configuration.md) · [Embedding video](advanced/embedding_video.md) ·
   [Embedding an HLS livestream](advanced/embedding_hls_livestream.md)
5. **Schedule containers** — [Upcoming items container](advanced/upcoming_items_templates.md) ·
   [Show tomorrow's schedule in the last gap](advanced/tomorrow_in_last_gap.md) ·
   [Daily schedule container](advanced/daily_schedule_templates.md) ·
   [Event scoped templates](advanced/event_scoped_templates.md)
6. **JavaScript** — [Template JavaScript best practices](advanced/template-js-best-practices.md) ·
   [JavaScript patterns and pitfalls](advanced/template_js_patterns.md) ·
   [JavaScript rules and upload validation](advanced/javascript_rules.md) ·
   [Time-based layout override](advanced/template_time_override.md) ·
   [Looping templates](advanced/looping_templates.md)
7. [Example templates](example_templates.md) — every downloadable ZIP, with what it shows.
