App locals should be available for all views
Closed this issue · 6 comments
It would be great if the variables you define using app.locals() would be available to all
rendered / partial views. Having this ability would save us from a huge rewrite and default to the
old functionality in express < 3.0
Hmm, I thought I had this covered already.
Could you update that test so it fails as it does in your app? Or simply give me a failing example?
I will provide a test case :)
Appreciate it!
Sorry about that.. mixup on my end! :)
Though i managed to provoke a curiosity when working with relative paths and partials.
path to view that tries to render a partial: ./views/test/promo/main
<%- partial("test/promo/sub") %>
resolves to -> ./views/sub
should be -> ./views/test/promo/sub
Haha, glad we got that settled.
And you're right, totally missing tests for the partial lookup. Need to work on that, adding another issue for it though.
Thanks!