waldson/twig-module-for-kohana

TWIG module for Kohana 3.3 to use twig templates as Kohana views seamlessly

Maintainers

Details

github.com/waldson/twig

Source

Issues

Installs: 34

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 2

Open Issues: 0

Type:kohana-module

0.1 2013-02-10 23:38 UTC

This package is not auto-updated.

Last update: 2024-04-13 11:08:55 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'));
	}

}