hoisie/mustache — pull request #36 by gabstv (2013-08-22 14:16:40+00:00)
Title: Ability to get partials from other folders

I'm working on a project that encapsulates mustache template engine by combining partials, so I needed a way to get partial templates from different paths.
This way you still need to specify paths by yourself, but there are several ways you could automate this (i.e. run a preprocessor that identifies include tags; doing a `path.Walk(...)` to get all the template files names and paths).

Usage:
```go
tpl := &mustache.Template{}
// to get a user partial template from a path that differs from the template path
tpl.SetPartialPath("user", "path/to/user.mustache")
// you can register as many partials as you need

// now parse the template
tpl.ParseFile("path/to/template")
// then render
tpl.Render(renderContents)
```