Liquid Basics

Liquid is a template engine extracted from the e-commerce system Shopify. Now t is a stand alone ruby library. Liquid can be used either in a Ruby application or in a Ruby On Rails application

Why Should We Use liquid ?

  1. Allow users to edit the appearance of your application.
  2. Easy and secure.
  3. Render templates directly from the database.
  4. Style HTML as well as emails.
  5. Extending Liquid is very easy
  6. Simple markups.
  7. If you like Smarty-style template engines

How to get it?

Liquid can be installed either as liquid gem or plugin.

Plugin can be installed simply with by script/install:

RubyGems

Liquid Basics
Liquid have two type of markups

  • Output markup (which may resolve to text)

             {{ matched pairs of curly brackets (ie, braces) }}
example

  • Tag markup (which cannot resolve to text and are used for logic)

             {% matched pairs of curly brackets and percent signs %}
example

  1. Mahesh says:

    hi,

    I am interested to know more about liquids…

  1. There are no trackbacks for this post yet.

Leave a Reply