TWIG
The flexible, fast, and secure
template engine for PHP
ABOUT
DOCUMENTATION
BLOG
DEVELOPMENT
CONTRIBUTORS
Twig Documentation
This is the documentation for the Twig general purpose template engine. Twig is a library for PHP 5.2 and onwards that is designed to be flexible, fast and secure.
Introduction / Installation
Twig for Template Designers
Twig for Developers
Extending Twig
Twig Extensions
Hacking Twig
Twig Recipes
Coding Standards
API
License
Built-in Tags
:
autoescape
,
block
,
do
,
extends
,
filter
,
flush
,
for
,
from
,
if
,
import
,
include
,
macro
,
raw
,
set
,
spaceless
,
use
.
Built-in Filters
:
capitalize
,
convert_encoding
,
date
,
default
,
escape
,
format
,
join
,
json_encode
,
keys
,
length
,
lower
,
merge
,
nl2br
,
number_format
,
raw
,
replace
,
reverse
,
slice
,
sort
,
striptags
,
title
,
upper
,
url_encode
.
Built-in Functions
:
attribute
,
block
,
constant
,
cycle
,
date
,
dump
,
parent
,
random
,
range
.
Built-in Tests
:
constant
,
defined
,
divisibleby
,
empty
,
even
,
null
,
odd
,
sameas
.
Built-in Operators
:
in
,
is
,
Math
(+, -, /, %, /, *, **),
Logic
(and, or, not, ()),
Comparisons
(==, !=, <, >, >=, <=,
===
),
Others
(.., |, ~, ., [], ?:).
Twig Extensions Documentation
Twig has a repository of contributed extensions. Read the associated
documentation
.
This website is powered by PHP and Twig. The Twig
logo
is © 2010 Sensio Labs