Field Helpers
Field helpers are shared functions available inside Web Controls templates. Use them to format data returned by the Arlo API without writing additional JavaScript.
Using Field Helpers
Call a helper inside an Underscore template with <%= ... %>. The fields available to a template depend on its control; refer to the relevant module page for its data fields.
<span class="event-date"><%= formatDate(StartDateTime, "D MMM YYYY") %></span>
Helper Reference
| Helper & Example | Description |
|---|---|
| arloDebug() Example: <%= |
Logs all non-function properties in the current template data object to the browser console. It renders no output. |
| formatDate(date, format) Example: <%= |
Formats a date using Moment.js format tokens. |
| formatCollection(collection, format, showLinks) Example: <%= |
Formats an array as comma-separated text (csv) or an unordered list (ul). Set showLinks to true when items with a ViewUri should be rendered as links. |
| formatAdvertisedOffers(config) Example: <%= |
Formats advertised or best advertised offers. Configuration includes freeText, showPriceWithTaxInclusive, showSingleOffer, showLabel, showCurrencyCode, showMessage, showTaxRate, and includeDiscountOffers. |
| formatRegistrationInfo(format) Example: <%= |
Renders an event registration action using the event's registration information. Use button, link, or message. |
| formatSessionsInformation(config) Example: <%= |
Renders session information for a multi-session event. Configure fieldsToDisplay, advertisedOffersConfig, template, or targetElement. |
| contentField(name) Example: <%= |
Returns the text for a named event-template content field. |
| formatEventTemplateCategoryBreadcrumbs(categories) Example: <%= |
Renders the first category path as an ordered breadcrumb list. |
| createMap(config) Example: <%= |
Creates a Google map from Location or GeoData. The application must be configured with googleMapsAPIKey. Configure width, height, zoom, and map type: static, dynamic, or embed. |
Accessibility
Use the HTML generated by helpers within semantic template markup. Provide descriptive link text, preserve heading order, and do not rely on generated content alone to communicate essential information.
