jaxon-php / jaxon-twig
Jaxon view renderer for the Twig template engine
v2.0.0
2017-06-29 14:41 UTC
Requires
- jaxon-php/jaxon-sentry: ~2.0
- twig/twig: ~1.0|~2.0
Provides
This package is auto-updated.
Last update: 2024-11-04 06:38:08 UTC
README
Render Twig templates in Jaxon applications.
Installation
Install this package with Composer.
"require": { "jaxon-php/jaxon-twig": "~2.0" }
Usage
Foreach directory containing Twig templates, add an entry to the app.views
section in the configuration.
'app' => array( 'views' => array( 'demo' => array( 'directory' => '/path/to/demo/views', 'extension' => '.html.twig', 'renderer' => 'twig', ), ), ),
In the application classes, this is how to render a view in this directory.
$this->view()->render('demo::/sub/dir/file');
Read the documentation to learn more about views in Jaxon applications.