Skip to content

Instantly share code, notes, and snippets.

@uppfinnarjohnny
Created December 15, 2011 08:44
Show Gist options
  • Save uppfinnarjohnny/1480398 to your computer and use it in GitHub Desktop.
Save uppfinnarjohnny/1480398 to your computer and use it in GitHub Desktop.
Mustache handling partials the Kohana way
<?php
class Kohana_Mustache extends Mustache {
protected function _getPartial($tag_name) {
$filename = Kohana::find_file('templates', $tag_name, 'mustache');
return file_exists($filename) ? file_get_contents($filename) : parent::_getPartial($tag_name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment