You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
321 B
11 lines
321 B
``constant``
|
|
============
|
|
|
|
``constant`` checks if a variable has the exact same value as a constant. You
|
|
can use either global constants or class constants:
|
|
|
|
.. code-block:: jinja
|
|
|
|
{% if post.status is constant('Post::PUBLISHED') %}
|
|
the status attribute is exactly the same as Post::PUBLISHED
|
|
{% endif %}
|
|
|