Obvious/matador — Issue #28: app.dynamicHelpers()
Author: srobbin
Created: 2012-03-02 03:48:17+00:00
State: open

Using other Express view engines (e.g. Jade) I am able to use [app.dynamicHelpers](http://expressjs.com/guide.html#app.dynamichelpers(\)) to make certain variables available to templates. For example:

```
app.dynamicHelpers({
foo: function(req, res) { return "Foo"; }
})
```

is accessible in my templates as:

```
Hello, {{foo}}!
```

However, it appears that the matador.engine is not passing the dynamic helpers through to res.render.

I suspect that it's this line in matador.js, but I'm not confident enough with the source to know for sure, or to suggest a pull request:

```
return hogan.compile(source, options).render(options.locals, options.partials)
```

Inspecting `options` I see `foo`, however it is a child of `options` itself, and not `options.locals`.