frizzy / slim-twig-extension
Twig extension for the Slim framework
Installs: 144
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/frizzy/slim-twig-extension
This package is not auto-updated.
Last update: 2025-10-07 05:36:54 UTC
README
Usage
Add the following to your root composer.json file:
{
"require": {
"frizzy/slim-twig-extension": "0.1.*"
}
}
Add the extension to your Twig environment:
<?php
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem(...));
$twig->addExtension(new \Frizzy\Slim\Twig\Extension);
?>
Functions available in Twig:
- render_route_name
- render_route_path
- render_template
- path
- url