mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-18 05:16:30 +00:00
Improved the code of an example
This commit is contained in:
+5
-5
@@ -50,12 +50,12 @@ use more complex ``expressions`` there too:
|
|||||||
|
|
||||||
.. code-block:: jinja
|
.. code-block:: jinja
|
||||||
|
|
||||||
{% if kenny.sick %}
|
{% if product.stock > 10 %}
|
||||||
Kenny is sick.
|
Available
|
||||||
{% elseif kenny.dead %}
|
{% elseif product.stock > 0 %}
|
||||||
You killed Kenny! You bastard!!!
|
Only {{ product.stock }} left!
|
||||||
{% else %}
|
{% else %}
|
||||||
Kenny looks okay --- so far
|
Sold-out!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|||||||
Reference in New Issue
Block a user