Docs

Writing templates

Liquid, expressions, taps, settings, partials, styling and layout in a template.

  1. LiquidThe template language a widget is written in, with its output, filters, conditions, loops and partials, and what Tiledash leaves out.
  2. ExpressionsCalculate, compare and choose in a template with let, double-brace expressions, conditions and a short list of functions.
  3. Taps and handlersMake parts of a widget do something when they are tapped, held or changed, or let whoever uses the widget choose what a tap does.
  4. SettingsLet each tile choose a device, a number, a colour or a title, and read the choice in the template and in the style.
  5. PartialsShare a piece of template between widgets with render, give it parameters, use the partials that come with Tiledash or from the community, and share your own.
  6. TranslationsShow a widget or partial in the viewer's language, with its texts, name and settings translated, and how translations travel with a widget you publish.
  7. StylingHow a widget’s CSS is scoped, how to use the theme’s variables, make it fit any tile size, behave on e-ink and respect motion, and what CSS is allowed.
  8. Layout blocksFold content into sections, switch between tabs, place icons and pictures anywhere, and make items follow the tile’s own layout settings.
  9. Widgets in widgetsDraw other widgets inside your own, such as a room card that shows each of its devices with its usual tile, and what a widget inside a widget may and may not do.