Skip to content

Template data fields

Every scheduled item reaches the sign with more than the fields its source provided: Onlit adds ready-formatted dates and times, schedule-position and gap metadata that a template can bind to with data-field and data-condition. This page lists those fields. To see them with one item's actual values, open the item's JSON page and expand Scheduled Item Metadata — see Editing scheduled item JSON.

Core fields

Present on every item, gaps included:

Field Value
room The room's current Room Display Title, or its title — system-managed, so a rename updates every sign
title The item's title as shown in the app; a gap has none
time_start, time_end The item's render times in YYYY-MM-DD HH:mm:ss, in the event's time zone (for example 2026-02-12 08:00:00) — what templates print, as opposed to the display time that decides when the item is on the sign (see Display time, render time and room offset)
system_is_gap true for a gap, false for a scheduled item

Present on scheduled items only:

Field Value
external_id The item's external ID, shown as Item ID in the app: the ITEM ID column of an Excel import, the source system's identifier for an API item (RainFocus: sessionId~sessionTimeID), or the ID given — or generated — when an item was created by hand. It cannot be set through the JSON editors, an Excel JSON_DATA cell or a query parameter. Not to be confused with the internal numeric item_id of the sign payload, which templates never see
the source's own fields Everything the integration or the Excel import stored, minus what field rules removed — speakers, descriptions, tracks, custom columns. Universal API items also carry _unique_id

room and external_id are system-managed and cannot be set through a JSON override; title follows the ownership rules on Editing scheduled item JSON. None of the five core fields can be replaced by a query parameter.

Ready-formatted times

Derived from time_start and time_end in the event's time zone, in English:

Field Example
start_time_ampm, end_time_ampm 10:00 AM, 2:00 PM
start_time_no_space_ampm, end_time_no_space_ampm 10:00AM, 2:00PM
start_time_24h, end_time_24h 14:00, 17:30
start_time_weekday, end_time_weekday Wednesday
start_time_month_short, end_time_month_short Feb
start_time_month_full, end_time_month_full February
start_time_date_dd, end_time_date_dd 12 (a number)

For any other format, language or time zone, bind the raw time_start/time_end with the Luxon attributes on Time formatting. Each boundary is derived on its own: if an item's stored time_start is missing or unparsable it gets none of the start_time_* helpers, but still gets the end_time_* helpers from a valid time_end, and the other way round. The item still shows on the sign.

Position in the day

Present on every item and gap, apart from the single gap of a room with no items:

Field Value
itemCountOfDay Number of items in this room on this calendar day, gaps included
itemPositionOfDay This item's zero-based position among them
isFirstRoomItemOfDay, isLastRoomItemOfDay true for the first or last of the day

Gap flags

Present on gaps only (system_is_gap === true):

Field true when
system_gap_isPreceding The gap before the first scheduled day — it starts at the beginning of time and ends at 00:00 of the first day with items
system_gap_isSucceeding The gap after the last scheduled day, extending into the future
system_gap_isFullDay The gap covers a whole calendar day with no items
system_is_first_gap_of_day The gap from 00:00 to the first item of a day that has items
system_is_last_gap_of_day The gap from the last item of such a day to 00:00 the next day

The last two pair with the upcoming-items container's scope: during the last gap of the day data-upcoming-scope="tomorrow" lists the next day's sessions, and after midnight the first gap of the new day takes over with "today" — see Show tomorrow's schedule in the last gap.

The single gap of a room with no items has system_gap_isPreceding and system_gap_isSucceeding both true, and the other three false.

<!-- A notice during a day without sessions -->
<div data-condition="system_gap_isFullDay === true">
  <p>No sessions scheduled today</p>
</div>

<!-- Timeline position: the gaps count too, so this is not a session number -->
<div class="counter">
  Entry <span data-field="itemPositionOfDay"></span> of <span data-field="itemCountOfDay"></span> in today's timeline
</div>

<!-- First/last badges -->
<span data-condition="isFirstRoomItemOfDay === true" class="badge">Opens the day</span>
<span data-condition="isLastRoomItemOfDay === true" class="badge">Closes the day</span>

The counts include the gaps between sessions, so the first entry of a day is usually the gap from midnight to the first session, not the first session itself. A sign that needs a real session counter ("Session 2 of 5") computes it in script.js from the room's item list, skipping entries whose system_is_gap is true. (itemPositionOfDay is zero-based; add one in CSS counters or in script.js if the sign should count from one.)

Custom JavaScript

You can optionally include a script.js file in your template ZIP to add custom behavior. This JavaScript runs after your template HTML and CSS have loaded.

What it may and may not do — in particular that it must not load files from the ZIP — and how the upload checks it are on JavaScript rules and upload validation; the lifecycle hooks that clean up timers and listeners for you are on Template JavaScript best practices.