Created
December 15, 2011 08:44
-
-
Save uppfinnarjohnny/1480398 to your computer and use it in GitHub Desktop.
Mustache handling partials the Kohana way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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