Forewords about terminology
In this documentation, the Twig
term represents the Twig language specifications, not the SensioLabs PHP implementation of the language - implementation being known as TwigPHP
. SensioLabs use Twig
to talk about both the specifications of the language and their implementation, and their documentation mix both specifications and implementation details. This should be considered as an oversight instead of an official convention.
Twing
is a Node.js implementation of Twig
language specifications.
Twing Documentation
Read the online documentation to learn more about Twing.
- Introduction
- Installation
- Twing for Template Designers
- Twing for Developers
- Extending Twing
- Twing Internals
- Twing recipes
- Coding standards
- Known issues
Twig Language Reference
Browse the online Twig language reference to learn more about built-in features.
tags
- apply
- autoescape
- block
- deprecated
- do
- embed
- extends
- filter
- flush
- for
- from
- if
- import
- include
- macro
- sandbox
- set
- spaceless
- use
- verbatim
- with
filters
- abs
- batch
- capitalize
- column
- convert_encoding
- date
- date_modify
- default
- escape
- filter
- first
- format
- join
- json_encode
- keys
- last
- length
- lower
- map
- merge
- nl2br
- number_format
- raw
- reduce
- replace
- reverse
- round
- slice
- sort
- spaceless
- split
- striptags
- title
- trim
- upper
- url_encode
functions
- attribute
- block
- constant
- cycle
- date
- dump
- include
- max
- min
- parent
- random
- range
- source
- template_from_string