waldson / twig-module-for-kohana
TWIG module for Kohana 3.3 to use twig templates as Kohana views seamlessly
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:kohana-module
Requires
- php: >=5.2
- composer/installers: *
- twig/twig: 1.*
This package is not auto-updated.
Last update: 2024-12-21 14:17:23 UTC
README
TWIG Module for Kohana 3.3 to use templates as Kohana views seamlessly.
Usage
// inside an action in your controller... $this->response->body(Twig_View::factory('path/to/your/twig/view');
there is also a template controller:
class Controller_Welcome extends Twig_Controller_Template { //default $template is twig/template public $template = 'path/to/your/template'; function action_index() { $this->var = 'value'; $this->foo = View::factory('your_normal_kohana_view'); $this->bar = Twig_View::factory('your_twig_view', array('view_var' => 'view_value')); } }