09/17/2015 08:50 AM Liquid Reference
Virto Commerce

Liquid Reference

Updated:

DotLiquid is a templating system ported to the .net framework from Ruby’s Liquid Markup. You can have your users build their own templates without affecting your server security in any way.

Liquid utilizes tags, objects, and filters to load content. Each theme consists of .liquid files that contain tags, objects and filters.

Tags

Tags are used to control the logic inside templates

<ul>
  {% for product in products %}
    <li>{{ product.title }}</li>
  {% endfor %}
</ul>

Read more

Objects

Object contain properties that can be displayed inside templates

{{ product.title }}

Output:
My Product Title

Read more

Filters

Filters are used to transform output of strings and objects

{{ product.title | upcase }}

Output:
MY PRODUCT TITLE

Read more

Topics