Twig Documentation
Main Page
Filters
abs
batch
capitalize
column
convert_encoding
country_name
currency_name
currency_symbol
data_uri
date
date_modify
default
escape
filter
find
first
format
format_currency
format_date
format_datetime
format_number
format_time
html_to_markdown
inky_to_html
inline_css
join
json_encode
keys
language_name
last
length
locale_name
lower
map
markdown_to_html
merge
nl2br
number_format
plural
raw
reduce
replace
reverse
round
shuffle
singular
slice
slug
sort
spaceless
split
striptags
timezone_name
title
trim
u
upper
url_encode
Functions
attribute
block
constant
country_names
country_timezones
currency_names
cycle
date
dump
enum
enum_cases
html_classes
html_cva
include
language_names
locale_names
max
min
parent
random
range
script_names
source
template_from_string
timezone_names
Guides
Accessing the parent Context in Nested Loops
Coding Standards
Comments
Containment Operators
Control Structure
Customizing the Syntax
Defining undefined Functions, Filters, and Tags on the Fly
Displaying Deprecation Notices
Escaping
Expressions
Extending Twig
Filters
Functions
Global Variables
HTML Escaping
Including other Templates
Iterable Operators
Literals
Loading a Template from a String
Macros
Making a Layout conditional
Making an Include dynamic
Marking a Node as being safe
Named Arguments
Operators
Overriding a Template that also extends itself
Recipes
Refreshing modified Templates when OPcache is enabled
Reusing a stateful Node Visitor
Setting Variables
Spaceship Operator
String Interpolation
Synopsis
Template Inheritance
Third-party Integrations
Twig for Template Designers
Using Twig and AngularJS in the same Templates
Using a Database to store Templates
Using different Template Sources
Using dynamic Object Properties
Validating the Template Syntax
Variables
Whitespace Control
Working with Automatic Escaping
Working with Manual Escaping
Operators
+
..
==
and
in
is
Tags
apply
autoescape
block
cache
deprecated
do
embed
extends
flush
for
from
guard
if
import
include
macro
sandbox
set
types
use
verbatim
with
Tests
constant
defined
divisible by
empty
even
iterable
mapping
null
odd
same as
sequence