Skip to content

waldson/twig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twig Module For Kohana 3.3

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'));
	}

}

About

Twig Module For Kohana 3.3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages