A curated list of snippets, tutorials, extensions for Twig created by Fabien Potencier and PHP frameworks using Twig
You might also like awesome-php.
Please read the contribution guidelines before contributing.
- Official Website
- Issues
- Github
- Getting Started Guide and Installation Instructions
- Documentation
- API Documentation
- CheatSheet
- Composer - Download Composer to use Twig easily.
- Packagist - Search on Packagist for Twig
- Drupal Twig
- Timber Twig
- Craft Twig
- https://github.com/andreia/awesome-twig - A collection of useful Twig snippets.
- https://github.com/okeeffed/cheat-sheets/blob/master/twig-cheat-sheet.md
- http://willthemoor.github.io/Twig-Cheat-Sheet/
- https://issuu.com/idcf-france/docs/twig-cheatsheet
- https://www.cheatography.com/ryguydg/cheat-sheets/symfony-and-twig/
- https://i.pinimg.com/originals/9b/7c/f0/9b7cf0ed69f91af8bdbf3d55ec5f893e.jpg
- Symfony - PHP framework created by Fabien Potencier, also creator of Twig
- Silex - PHP micro-framework based on Symfony also created by Fabien Potencier
- ezPublish - open source enterprise PHP content management system
- Themosis - A WordPress framework
- Drupal8 - Popular PHP CMS
- Timber - Templating system for Wordpress
- OctoberCMS - PHP CMS based on Laravel
- CraftCMS - Focused content management for web professionals
- phpBb - Free and Open Source Forum Software
There's also a lot of frameworks & cms created by community using twig. There is also many packages integration for other frameworks such as Laravel, Slim, Yii Framework, CodeIgniter, CakePHP, etc.
- You might use the following tags:
twig
,templating
,twig
+php
. - Ask a new question
- Find questions tagged
twig
- Paginator Twig Extension - Twig extension to help generate simple paginations in Twig templates.
- Truncate Text - A custom twig extension to truncate text while preserving HTML tags.
- HTML Compress - Twig extension for compressing HTML and inline CSS/JS using WyriHaximus/HtmlCompress
- Breakpoints - Twig extension to set breakpoints
- PHP Functions - This extension allows you to call (almost) any PHP function from your Twig templates.
- Var Type Checker - Simple var type checker for Twig
- core23/twig-extensions - Bunch of awesome twig extensions by core23
- twigphp/twig-extensions - Bunch of awesome official twig extensions
- jasny/twig-extensions - Bunch of awesome twig extensions by jasny
- kzykhys/twig-extensions - Bunch of awesome twig extensions by kzykhys
- vudaltsov-legacy/twig-extensions - Bunch of awesome twig extensions by kzykhys
- JMB-Technology-Limited/twig-extensions - Bunch of awesome twig extensions by JMB-Technology-Limited
- SortByField - A Twig Extension filter to sort an array of entries (objects or arrays) by an entry field.
- Assetic - Twig extension of PHP assets manager
- Asset Version - Render versioned asset filenames in twig.
- Laravel DebugBar - Twig extensions for the Laravel library LaravelDebugBar
- PHP DebugBar - A Twig extension to provide access to PHP Debug Bar's rendering functions.
- Twi18n - Powerful Twig translation extension using PHP's gettext.
- Cache - Cache fragments of templates directly within Twig.
- Markdown - Twig extension to work with Markdown content
- Markdown² - A simple twig markdown extension.
- Defer Block Rendering - An extension for Twig that allows to defer block rendering
- GetText Extractor - friendly tool which extracts translations from twig templates.
- Twig Lambda - Lambda expressions for Twig and filters that make use of them
- EmailObfuscator - A text filter for automatic email obfuscation using the well-established Javascript and a CSS fallback:
- Configurable i18n - extension allowing you to customize which functions to use for translations.
- Webpack - Inject your webpack entry points into twig templates with easy.
- Country - Twig country filter extension for twig
- MobileDetect - MobileDetect-integration for Twig
- emberlabs/Gravatar - easy gravatar twig integration by emberlabs
- ry167Gravatar² - An extension for Twig that provides simple filters for Gravatar by ry167.
- HTML Helpers - Rails style view helpers for HTML tags in PHP Twig
- QRCode - A Twig extension for embedding inline QR codes in Twig templates
- Whitespace Collapse - Whitespace collapse extension for Twig
- Const Resolver - Simple Twig plugin to resolve constant on template cache build
- OrdinalNumber - A Twig Extension filter to format number into ordinal form (1st, 2nd, etc.).
- Apply Filters - This filter allows you to call dynamic filters in twig.
- Strftime - use strftime function in twig
- SVG - Add inline svg with Twig$
- csg4twig - A CSV escaping filter for the Twig templating engine.
- Share - Twig extension providing social share links
- Parsedown (Markdown Parser) - Parsedown's Markdown parser Extension
- Linewrap - Twig filter to wrap lines exceeding the specified length.
- Inflection - Filters (singularize and pluralize)
- Array Group - Twig filter that splits an array into a given number of groups (unlike batch, which splits the array based on items per group)
- Geshi - Twig extension to work with Geshi - Generic Syntax Highlighter rendering
- Natural Join - Twig filter that joins an array using a different separator for the last element
- Gist - A simple Twig extension for embedding GitHub Gist snippets into Twig templates.
- Resource - Resource handling for Twig templates
- LocaleName - Twig locale name filter extension for twig
- Safe Date - A safe date function in twig that will not set null dates to today.
- Useful HTML Extension - Some useful Twig functions for context-relevant class rendering.
- CSRF Helpers - CSRF (Cross-Site Request Forgery) protection helpers for the Twig templating engine.
- Linkify - Twig extension for Linkify - converts URLs and email addresses into HTML links
- HTMLStrip - Filter for Twig to convert HTML into Text
- List Loop - A different way to display lists, grids and tables in Twig: the list loop.
- faker - Integration of PHP faker library with the twig templating system.
- Twital - It's a plugin for Twig that adds some sugar syntax, which makes its templates similar to PHPTal or VueJS.
- Relative Path - A Twig extension that allows to include and extends templates using relative paths.
Check this page to discover the multiples extensions for IDE & code editors created by community
- CraftTwig - Plugin for Sublime Text, Atom adding CraftCMS Twig snippets
- October Twig Highlighter - This package adds syntax definitions for the OctoberCMS Twig engine
- Atom Twig Packages - Shortcut to Twig packages list for Atom
- VSCode Twig Packages
- Shortcut to Twig packages list for Visual Studio Code
Coming soon
- TwigExpress - Getting started with Twig templates thanks to a simple PHP script
- TwigFiddle - Develop, run, store and access Twig code online
- Twigcs - Check for violations on Twig coding standard
- Read more
- twing - JS implementation of the Twig Templating Language (compatible with Twig 1, 2 and 3)
- twig.js - JS implementation of the Twig Templating Language
- swig - JS implementation of the Twig Templating Language²
- Nunjucks - JS implementation of the Twig Templating Language³
- Template7
- Underscore.js
- EJS
- mustache.js
- Handlebars
- Javascript Templates
- Jinja2 - Templating system for Python Django Framework
To the extent possible under law, Julien RAVIA has waived all copyright and related or neighboring rights to this work.