mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 02:40:41 -07:00
Tiny fixes
This commit is contained in:
+5
-5
@@ -4,11 +4,11 @@ title: Types
|
|||||||
|
|
||||||
Liquid objects can have one of six types:
|
Liquid objects can have one of six types:
|
||||||
|
|
||||||
- [string](#string)
|
- [String](#string)
|
||||||
- [number](#number)
|
- [Number](#number)
|
||||||
- [boolean](#boolean)
|
- [Boolean](#boolean)
|
||||||
- [nil](#nil)
|
- [Nil](#nil)
|
||||||
- [array](#array)
|
- [Array](#array)
|
||||||
- [EmptyDrop](#emptydrop)
|
- [EmptyDrop](#emptydrop)
|
||||||
|
|
||||||
Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags.
|
Liquid variables can be initialized by using the [assign](/tags/#assign) or [capture](/tags/#capture) tags.
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ For example, you can show basic content like a page title using a Liquid object:
|
|||||||
|
|
||||||
In this case, Liquid is rendering the content of an object called `page.title`, and that object contains the text `Overview`.
|
In this case, Liquid is rendering the content of an object called `page.title`, and that object contains the text `Overview`.
|
||||||
|
|
||||||
[Filters](/filters) can change the way objects are printed.
|
[Filters](/filters) can change the way objects are rendered.
|
||||||
|
|
||||||
### Tags
|
### Tags
|
||||||
|
|
||||||
**Tags** create the logic for your template, including variable assignment, conditionals, and loops.
|
**Tags** create the logic and control flow for your template, including variable assignments, conditionals, and loops.
|
||||||
|
|
||||||
Tags are denoted by curly braces and percent signs: `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}`.
|
Tags are denoted by curly braces and percent signs: `{% raw %}{%{% endraw %}` and `{% raw %}%}{% endraw %}`.
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ Hello Adam!
|
|||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
This conditional statement `if user` checks to see if an object called `user` exists. If the condition is *true* (that is, if `user` exists), Liquid shows any content that is contained between the `if` and `endif` tags.
|
This conditional statement `if user` checks to see if an object called `user` exists. If the condition is *true* (that is, if there is a `user`), Liquid shows any content that is contained between the `if` and `endif` tags.
|
||||||
|
|
||||||
In this case, our user's `name` is Adam, so the template prints `Hello Adam!`.
|
In this case, our user's `name` is Adam, so the template prints `Hello Adam!`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user