Liquid Template
Liquid Overview

Liquid Template

Introduction

For Liquid support we use the awesome Liquidjs (opens in a new tab) by harttle inside the app. Liquidjs is a simple, expressive, safe and Shopify compatible template language.

Whether it's rendering product information, customizing layouts, or handling conditional logic, Liquidjs empowers us to handle complex templating tasks with ease. Its extensive documentation and active community support also make it a reliable and well-maintained tool for our development needs.

Tags and Filters

Tags and Filters play a crucial role in Liquid templating, providing powerful tools to manipulate and display data within our application.

Tags

Let's explore some inbuilt tags and filters available by default in Liquidjs. You can read documentation about them in the official Liquidjs website.

assign (opens in a new tab), capture (opens in a new tab), case (opens in a new tab), comment (opens in a new tab), cycle (opens in a new tab), decrement (opens in a new tab), echo (opens in a new tab), else (opens in a new tab), elsif (opens in a new tab), for (opens in a new tab), if (opens in a new tab), include (opens in a new tab), increment (opens in a new tab), layout (opens in a new tab), liquid (opens in a new tab), raw (opens in a new tab), render (opens in a new tab), tablerow (opens in a new tab), unless (opens in a new tab), when (opens in a new tab)

Filters

With filters, we can easily modify data on the fly without altering the underlying data itself, making it an efficient and non-destructive way to handle data processing. Here are some key aspects of filters and their usage:

{{ variable_name | filter_name: parameter }}

Let's explore some inbuilt tags and filters available by default in Liquidjs:

abs (opens in a new tab), append (opens in a new tab), at_least (opens in a new tab), at_most (opens in a new tab), capitalize (opens in a new tab), ceil (opens in a new tab), compact (opens in a new tab), concat (opens in a new tab), date (opens in a new tab), default (opens in a new tab), divided_by (opens in a new tab), downcase (opens in a new tab), escape (opens in a new tab), escape_once (opens in a new tab), first (opens in a new tab), floor (opens in a new tab), join (opens in a new tab), json (opens in a new tab), last (opens in a new tab), lstrip (opens in a new tab), map (opens in a new tab), minus (opens in a new tab), modulo (opens in a new tab), newline_to_br (opens in a new tab), plus (opens in a new tab), prepend (opens in a new tab), raw (opens in a new tab), remove (opens in a new tab), remove_first (opens in a new tab), remove_last (opens in a new tab), replace (opens in a new tab), replace_first (opens in a new tab), replace_last (opens in a new tab), reverse (opens in a new tab), round (opens in a new tab), rstrip (opens in a new tab), size (opens in a new tab), slice (opens in a new tab), sort (opens in a new tab), sort_natural (opens in a new tab), split (opens in a new tab), strip (opens in a new tab), strip_html (opens in a new tab), strip_newlines (opens in a new tab), times (opens in a new tab), truncate (opens in a new tab), truncatewords (opens in a new tab), uniq (opens in a new tab), upcase (opens in a new tab), url_decode (opens in a new tab), url_encode (opens in a new tab), where (opens in a new tab)

Additional Filters

Here are some additional filters that we have added to Liquidjs to make it more powerful and useful for Ryu Order Printer users.

  1. Barcode
  2. QR Code