Table of contents



Here’s a short example containing most features described below:

 # This file is part of the PROJECT-name package.
 # (c) Author name <>
 # For the full copyright and license information, please view the LICENSE
 # file that was distributed with this source code.

{% short_method_call_that_fits_on_one_line(arguments) %}

{% link_to(
) %}
  • Don’t disable auto escaping on a global basis!
  • When wrapping long lines, keep the method name on the same line of the interpolation operator and keep each method argument on its own line;
  • Use spaceless to minify output content (unless needed by the output format);


  • Code is released under the MIT license, and the license block has to be present at the top of every Twig file, before any HTML or Twig tag.