Closed joanniclaborde closed 10 years ago
@joanniclaborde thanks! This seems like a reasonable request. I might try to make this automatic by adding some logic to the _getPartialName()
method, instead of forcing it via config.
@joanniclaborde I've recently rewrote this package to use Promises. As stated above, I think this is a good feature to add for v1.0. Would you be up for re-implementing this PR against the promises branch? If not, I can re-write these changes to work with the new branch; just wanted to make sure you had a chance to get commit-credit for it.
Sure, I'll try to get this done within the next few days!
@joanniclaborde thanks! Sorry for the churn.
Done, it's here: https://github.com/ericf/express3-handlebars/pull/70
It's the first time I try Promises, but I think all is working fine...
Closing in favor of #70
As stated in #20, having multiple
partialsDir
can introduce naming collisions. This pull request adds support for partials namespaces. EachpartialsDir
can optionally be specified as an object, with adir
andnamespace
properties. Example:If both
local/views
and/otherPackage/shared/views
contain a template namedstatus.hbs
, they can be included like this in a view: