Updated Liquid for Designers (markdown)

RichMorin
2012-02-23 14:32:40 -08:00
parent b8fe78fb9a
commit 7555a02c04
+14 -2
@@ -84,7 +84,8 @@ Here is a list of currently supported tags:
* **cycle** - Cycle is usually used within a loop to alternate between values, like colors or DOM classes.
* **for** - For loop
* **if** - Standard if/else block
* **include** - Includes another template, useful for partials
* **include** - Includes another template; useful for partials
* **raw** - temporarily disable tag processing to avoid syntax conflicts.
* **unless** - Mirror of if statement
### Comments
@@ -95,6 +96,17 @@ Comment is the simplest tag. It just swallows content.
We made 1 million dollars {% comment %} in losses {% endcomment %} this year
```
### Raw
Raw temporarily disables tag processing.
This is useful for generating content (eg, Mustache, Handlebars) which uses conflicting syntax.
```liquid
{% raw %}
In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
{% endraw %}
```
### If / Else
`if / else` should be well known from any imaginable programming language.
@@ -327,4 +339,4 @@ the given variable instead of rendering it to the screen.
<option value="green">Green</option>
<option value="blue">Blue</option>
</select>
```
```