---
description: Change what one screen shows by appending query parameters to its sign URL — how the values reach templates, the automatic types, the protected names, encoding, the direction-arrow and feature-toggle patterns, and why virtual-room signs ignore them.
---

# URL query parameter overrides

Several screens often show the same room's schedule but need one detail each: the arrow
toward the room, the name of the hall, a sponsor for that spot. Rather than a template per
screen, append query parameters to the sign URL: they become data fields the template can
bind to, so one template serves every screen.

## How it works

Parameters after the `?` in the sign URL are merged into the `data` object of every
scheduled item (and gap) in the room, on the first load and on every later refresh. A
parameter with the same name as a field in the item replaces it; anything else is simply
added. The template reads them like any other field:

```
https://<your-server>/sign/1/rooms/5/view?building=North%20Wing&showWeather=true&direction=NE
```

```html
<p data-field="building"></p>                                    <!-- North Wing -->
<div data-condition="showWeather === true" class="weather">…</div>
<img src="assets/arrow-ne.svg" data-condition="direction === 'NE'" />
```

Parameter names are case-sensitive and should be plain identifiers (`showWeather`, not
`show-weather`), so they can be used in `data-condition` expressions.

## Value types

| Value in URL | Becomes | Example |
| --- | --- | --- |
| `true` or `false`, any case | boolean | `?enabled=true` → `true` |
| a number, with or without decimals | number | `?count=42` → `42`, `?opacity=0.75` → `0.75` |
| anything else | string | `?name=John%20Doe` → `"John Doe"` |
| nothing | empty string | `?message=` → `""` |

Leading zeros are lost on numbers (`007` → `7`) and `1,000,000` is a string; to keep a
numeric-looking code as text, give it a letter (`code-007`).

## Protected names

These cannot be overridden and are ignored if present: `title`, `room`, `external_id`,
`time_start`, `time_end` — the fields the schedule itself owns — and `fakeNow`,
`freezeTime`, which are the simulated-clock parameters described on
[Preview a sign at a specific time](preview_at_time.md).

## Encoding

Spaces and punctuation must be URL-encoded: `%20` for a space, `%26` for `&`, `%3D` for `=`,
`%25` for `%`. The app's **Event Sign URLs** list gives you the base URL to append to. Do not put passwords, keys or anything private in a sign URL —
it is visible to anyone who can see the screen's configuration.

## Patterns

**Per-screen details** — `?building=North%20Wing&floor=2` with `data-field` elements in the
header of the template.

**Feature toggles** — `?showSponsors=false` and `<div data-condition="showSponsors">` around
the sponsor strip; a missing parameter fails the condition, which hides the strip, so the default
is "off" unless the template provides the field itself. This needs a name the browser doesn't
already have: `location` and `top`, for example, are always there, so a condition on one of them
passes and the element shows.

**Themes** — `?theme=dark` and two containers with `data-condition="theme === 'dark'"` /
`"theme === 'light'"`.

**Direction arrows** — one template, eight arrow images, `?direction=N` … `NW` on each
screen's URL:

```html
<div class="wayfinding">
  <img src="assets/arrow-n.svg"  alt="North"      data-condition="typeof direction === 'string' && direction.toUpperCase() === 'N'" />
  <img src="assets/arrow-ne.svg" alt="North East" data-condition="typeof direction === 'string' && direction.toUpperCase() === 'NE'" />
  <!-- … E, SE, S, SW, W, NW … -->
  <div data-condition="typeof direction !== 'string' || !['N','NE','E','SE','S','SW','W','NW'].includes(direction.toUpperCase())">
    Direction unavailable
  </div>
</div>
```

Test for the parameter with `typeof` before reading it: a URL without `?direction=` leaves
the name undefined, and an expression that reads an undefined name throws, which counts as
false — so a fallback written as `!direction` or `direction || ''` would never show.

## Limits

- **Virtual-room signs ignore data overrides.** The event-scoped runtime reads only
  `fakeNow` and `freezeTime` from the URL; an overview sign that needs per-screen variation
  gets it from its [source rooms](../events/virtual_rooms.md) or from a template per screen.
- Overrides apply to the sign page only — not to previews in the app, which are opened
  without parameters unless you add them to the URL yourself.
- If a parameter does not show up, check the URL (a `?` before the first parameter, `&`
  between them), the exact spelling of the name, that it is not a protected name, and the
  browser console on the sign, which logs parameters it could not read.

## Related

- [Sign URLs](sign_links_dashboard.md)
- [Preview a sign at a specific time](preview_at_time.md) — `fakeNow` and `freezeTime`
- [Data binding reference](../custom-templates/basic/unsupported_characters_expressions.md) — how `data-field` and `data-condition` read the merged fields
