Twigtools is a PyroCMS plugin, providing useful tools for development and debugging with twig.
Initially this provides the following functions inside twig templates:
dd
Dumps an item and kills the rest of the page.debug
Dumps an item and continues executiondebug
Debugs an item to Debugbar under the Messages tab
You can install this plugin into your existing PyroCMS 3.x installation by requiring it inside your composer file:
"require-dev": {
"evoluted/twigtools-plugin": "~1.0",`
}
Or by running the command line composer install command:
composer require evoluted/twigtools-plugin
Once installed you will not have to perform any additional actions to start using this plugin.
dd(yourVariable)
Uses Laravels dump method, and stops execution.
dump(yourVariable)
Uses Laravels dump method, but continues rendering the rest of the page.
debug(yourVariable)
Debugs a variable to Laravel Debugbar (if it is installed)
- Manipulation of objects and arrays (E.g resorting, inserting within arrays, etc)
- Debug to log files from within twig
- 1.0.0
- Initial release, containing
dd()
,debug()
,debug()
- Initial release, containing
- Fork it (https://github.com/EvolutedNewMedia/twigtools-plugin/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request