Because logic belongs in PHP, not Twig.
A collection of Twig enhancements to help you develop better, cleaner Craft CMS templates more quickly.
Because simple templates are easier to understand, and code that is easier to understand is easier to maintain.
Craft CMS is a great tool for building websites, but it's not perfect. One of the biggest issues is that its very power and flexibility means it's very easy to end up with a lot of logic in your templates.
See the docs for detailed usage information.
- Utility functions
- String helpers
- SVG helpers
- Query/Collection helpers
- Eager loading helpers
- Debugging helpers
- Operators
- Media helpers
- The Stash
- The ability to define custom/one-off helpers
Via composer:
composer require zaengle/craft-toolbelt
php craft plugin/install toolbelt
composer test
Please see CHANGELOG for more information on what has changed recently.
Please note: This is primarily an internal tool, so while PRs that add features will be considered, contributions will be evaluated based on their fit with Zaengle's approach and priorities rather than other consumers. Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
- Zaengle Corp
- Empty Coalesce /
???
lifted from the plugin of the same name by nystudio107 - Classnames functionality based on the plugin of the same name by Viget
- Idea for custom helper from Twig Toolbox, but re-implemented here
License: MIT Please see License File for more information.