New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Multiple View Folders #2320
Conversation
@@ -54,14 +54,25 @@ function View(name, options) { | |||
|
|||
View.prototype.lookup = function(path){ | |||
var ext = this.ext; | |||
|
|||
if (this.root instanceof Array) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Array.isArray
, please :)
In general I think this is useful. |
I believe it should be directed to expressjs/templation instead, express should eventually use that anyway. |
Not necessarily.. |
We will accept the PR here and land it where ever it needs to go later. |
25b80a9
to
3dca534
Compare
91891e3
to
7289171
Compare
360b52c
to
6f0302f
Compare
This PR still needs to be refactored to remove that fake context thing. I need to get 4.10 out ASAP, so if I don't have time to refactor this tomorrow (and I guess no one updates this PR to address it), then I'll just push it back to 4.11. |
Thanks for getting this merged, this feature just saved my life 😀 |
This adds support for supplying an array of view folders in place of a single view folder [string], allowing for a "fallback" folder of views to be overridden by a preferred location, if they exist.