Design Templates
The Templatesfeature enables customization of the look and feel of various Kensium POS user interface elements. These elements include public facing web pages, as well as email messages that are sent to users. Of note, this customization can be performed by an administrator without requiring code changes or a developer.
Templates are created using the Liquid Templating language, which is within several organizations. Overviews of the templating language can be found at third party sites, such as:
- Tutorial: https://learn.cloudcannon.com/jekyll/introduction-to-liquid/
- Shopify and Liquid: https://shopify.github.io/liquid/
- Twilio and Liquid: https://www.twilio.com/docs/studio/user-guide/liquid-template-language
- Developer details for Orchard: https://github.com/sebastienros/fluid
The links above may contain details that are specific to their environments, and not all details may be supported in Kensium POS. We plan to create documentation for Liquid usage within POS in the future.
Kensium POS processes templates in the following manner:
- The template contains a basic ’layout’ of text or HTML.
- Kensium POS passes input data to the template, called input variables. The acutal input variables sent to the template depends on the template type.
- The template will also contain liquid commands, that will transform the model data into additional text or HTML. This is called dynamic content.
- Kensium POS runs the template to generate output text or HTML.
A sample Liquid template is:
This is a template override!
<a href=”{{Model.ConfirmEmailUrl | raw}}”>Click here</a> to confirm your email.
The values in the double brackets are the model variables that are replaced when the email is generated. You can also use filters to transform those variables (e.g. the raw filter above).
Otherwise, a template can contain any valid HTML tags, including all formatting and style tags, as well links and images.
Email Templates
Kensium POS sends email notifications to customers for a variety of reasons, including confirmation of email addresses to verify accounts, and updates on the status of an order. By default, the format of the emails is simple and general-purpose. A client implementation will likely want to customize the message and formatting of these emails.
With email templates it’s recommended to avoid referencing external CSS or images. as email readers will often prevent loading of those files for security reasons. Instead, put CSS within the HTML itself, and try to use (small) embedded images (see https://www.bigfastblog.com/embed-base64-encoded-images-inline-in-html).
Template List
The following is a list of some of the templates that can be customized within Kensium POS.