ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

Add support for multiple partials directories #20

Closed ericf closed 11 years ago

ericf commented 11 years ago

Adding support for multiple partials directories will enable people to have their partials split across various directories. One common use-case is shared vs. server-only partials, where the shared partials are also used on the client, e.g., an app could have "shared/templates" and "views/partials" directories which contain templates that can be used as partials.

When naming the partials for use in other templates, each partials dir would be considered a root, therefore "views/partials/header.handlebars" would be available via {{> header}}. This creates a situation for naming collisions, which can be managed in a last-one-wins fashion.

ericf commented 11 years ago

This feature could utilize #21