You are browsing the documentation for Symfony 2.4 which is not maintained anymore.
Consider upgrading your projects to Symfony 5.3.
Recipes about Templating
The Symfony Cookbook is a continuously growing collection of specific recipes that explain how to correctly solve the most recurrent problems that Symfony developers face in their day to day work.
- How to Inject Variables into all Templates (i.e. global Variables)
- How to Use and Register Namespaced Twig Paths
- How to Use PHP instead of Twig for Templates
- How to Write a custom Twig Extension
- How to Render a Template without a custom Controller
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.