Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape liquid template tags?

This sounds very easy, however I couldn't find it anywhere in the docs. How can I write {% this %} in a liquid template, without it being processed by the engine?

like image 317
Attila O. Avatar asked Aug 06 '10 17:08

Attila O.


People also ask

What does escape do in liquid?

Escapes a string by replacing characters with escape sequences (so that the string can be used in a URL, for example). It doesn't change strings that don't have anything to escape.

How do you comment out liquid code?

Click on three bold dots and choose 'Edit HTML/CSS': Select the liquid file from the left sidebar and click on it. In order to comment out the needed part of the code, put the {% comment %} tag before needed code and {% endcomment %} tag after it.

What is DotLiquid?

What is DotLiquid? DotLiquid is a templating system ported to the . net framework from Ruby's Liquid Markup. It's easy to learn, fast and safe. You can have your users build their own templates without affecting your server security in any way.

What is raw Shopify?

raw. Temporarily disables tag processing. This is useful for generating certain content that uses conflicting syntax, such as Mustache or Handlebars.


1 Answers

it is possible to disable liquid processing engine using the raw tag:

{% raw  %} {% this %} {% endraw %} 

will display

{% this %} 
like image 71
Etienne Avatar answered Sep 23 '22 14:09

Etienne