Skip to main content

Template reference

The waiting page is a Go html/template with [[ and ]] as delimiters. Values are HTML-escaped unless passed to safeHtml. Guide: Waiting page and translations.

Queue data​

VariableTypeContent
.QueueData.PositionintPosition in the queue, from 1
.QueueData.QueueSizeintNumber of visitors in the queue
.QueueData.EstimatedWaitTimeintApproximate wait, in minutes, at least minWaitTimeMinutes
.QueueData.RefreshIntervalintrefreshIntervalSeconds
.QueueData.ProgressPercentageintShare of the queue behind the visitor, from 0 to 100
.QueueData.DebugInfostringInternal state; empty unless debug=true

The wait time is an approximation: the number of visitors ahead multiplied by a factor between 0.3 and 0.62 minute that depends on the position, rounded up.

Translations​

VariableJSON keyDefault page use
.Translations.PageTitlepageTitle<title>
.Translations.TitletitleHeading
.Translations.IntroductionintroductionParagraph under the heading
.Translations.YourPositionyourPositionLabel of the position
.Translations.ETAetaLabel of the wait time
.Translations.RefreshTimerefreshTimeReload message: a printf format with %d, may contain HTML
.Translations.MinsminsUnit after the wait time

When the language is missing from the file, every translation is empty, and printf on an empty refreshTime prints %!(EXTRA int=20).

Function​

FunctionRole
safeHtmlOutputs a string without escaping. Use it only on your own texts
[[ printf .Translations.RefreshTime .QueueData.RefreshInterval | safeHtml ]]

Built-in page​

When the template file is missing or cannot be parsed, the plugin serves a built-in English page with the same data, without translations.